필터 지우기
필터 지우기

Question about length function

조회 수: 1 (최근 30일)
SeungHyun Cha
SeungHyun Cha 2020년 6월 14일
댓글: madhan ravi 2020년 6월 14일
array1 = [1 4 7 3 5 8 9; 12 13 11 10 14 19 17; 22 29 21 24 27 28 20; 33 31 39 30 38 34 35; 41 42 45 49 48 47 46];
The question is
How can you obtain the number of rows and the number of columns of a matrix by applying the length function?
I think the length function shows only the longest length of matrix, so I do not know how to make commands.

채택된 답변

madhan ravi
madhan ravi 2020년 6월 14일
[rows,columns] = size(array)
  댓글 수: 5
SeungHyun Cha
SeungHyun Cha 2020년 6월 14일
Thanks...!
madhan ravi
madhan ravi 2020년 6월 14일
Exactly! Now make it as a function that returns two outputs.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by