function D = diagonalMatrixFromVector(d)

    % DIAGONALMATRIXFROMVECTOR coverts a vector into a diagonal matrix.
    %
    % FORMAT: D = diagonalMatrixFromVector(d)
    %
    % INPUT:  - d = [n * 1] vector;
    %
    % OUTPUT: - D = [n * n] diagonal matrix.
    %
    % Authors: Daniele Pucci, Marie Charbonneau, Gabriele Nava
    %          
    %          all authors are with the Italian Istitute of Technology (IIT)
    %          email: name.surname@iit.it
    %
    % Genoa, Dec 2017
    %

    %% --- Initialization ---
    
    D = diag(d);
end
robotology
github-repos/MATLAB/robotology-whole-body-controllers/whole-body-controllers-90ff965a523f0a120e6a8981b71326c1485e7742/library/matlab-wbc/+wbc/diagonalMatrixFromVector.m
whole-body-controllers
github-repos/MATLAB/robotology-whole-body-controllers
90ff965a523f0a120e6a8981b71326c1485e7742