set a variable equal to the count

조회 수: 8 (최근 30일)
Jordan Grapel
Jordan Grapel 2019년 10월 10일
댓글: Jordan Grapel 2019년 10월 10일
how do I set a variable equal to the number of numbers in my array.
For example, if I have an array that contains 1981 numbers, and another array that contains 6229 numbers, how do I create a variable where k=1981 for the first array and k=6229 for the second and so on?

채택된 답변

Fangjun Jiang
Fangjun Jiang 2019년 10월 10일
편집: Fangjun Jiang 2019년 10월 10일
numel()
  댓글 수: 1
Jordan Grapel
Jordan Grapel 2019년 10월 10일
Thank you. Worked like a charm.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by