Return the number of rows of an array
12 ビュー (過去 30 日間)
表示 古いコメント
Hi, I just started using Matlab and is confused on how to extract the row indices/ row numbers.
For example, I have a function A:
A = [10 20 30 40 50 60 70 80 90 100]
I wanted to extract the row which has elements less than 50 so it will give
B= [1 2 3 4] (from row 1 to 4)
May I know how to do this? Any help and advice is greatly appreciated
1 件のコメント
Stephen23
2021 年 5 月 25 日
You seem to have confused rows with columns:
Your example A has only one row and ten columns, whereas your example B has one row and five columns.
採用された回答
その他の回答 (1 件)
参考
カテゴリ
Find more on Matrices and Arrays 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!