Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
12 lines (12 sloc) 340 Bytes
function l = length(x)
%% l = length(x)
%% returns the length of x if x is a vector. This is the number of columns
%% for a row vector, or the number of rows for a column vector. If x is a
%% non-vector matrix, returns the number of columns.
r = columns(x);
if r == 1
l = rows(x);
l = r;
Jump to Line
Something went wrong with that request. Please try again.