No BSD License  

Highlights from
MatPlanWDM v0.5

image thumbnail
from MatPlanWDM v0.5 by Pablo Pavon MariƱo
Educational network planning tool for the RWA problem in WDM networks (MILP and heuristic based)

makeRowVector (vector)
%  makeRowVector
% 
%>> Usage: [rowVector] = makeRowVector (vector)
%
%>> Abstract: This function converts a vector into a row vector. If the
%   input argument is not a vector, the function returns an empty matrix.
%   If the input argument is a row vector, the function returns it.
%
%>> Arguments:
% o  In: 
%  . vector: Vector of any length (row or column vector).
%
% o Out:
%   rowVector: Row vector based on the input argument 'vector'.
%


function [rowVector] = makeRowVector (vector)
    if (length (vector) ~= numel(vector))
        rowVector = [];
    end
    if (size (vector,1) == 1)
        rowVector = vector;
    else
        rowVector = vector';
    end
end 
            

Contact us at files@mathworks.com