필터 지우기
필터 지우기

Which function will tell me how many rows and columns in matrix?

조회 수: 1 (최근 30일)
Sameer
Sameer 2014년 5월 18일
편집: Image Analyst 2014년 5월 18일
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.

답변 (1개)

Image Analyst
Image Analyst 2014년 5월 18일
편집: Image Analyst 2014년 5월 18일
theDimensionSizes = size(A);
numDims = ndims(A);
for d = 1 : numDims
fprintf('Dimension #%d is %d long.\n', k, theDimensionSizes(k));
end

카테고리

Help CenterFile Exchange에서 Hypothesis Tests에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by