Which function will tell me how many rows and columns in matrix?
Show older comments
How would I be able to write row(A) and it would output the number of rows in matrix A?
What function should I use and write? Same with columns?
Thanks.
Answers (1)
Image Analyst
on 18 May 2014
Edited: Image Analyst
on 18 May 2014
theDimensionSizes = size(A);
numDims = ndims(A);
for d = 1 : numDims
fprintf('Dimension #%d is %d long.\n', k, theDimensionSizes(k));
end
Categories
Find more on Signal Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!