Matrix consisting of sub-elements of another matrix
1 回表示 (過去 30 日間)
古いコメントを表示
採用された回答
Matt J
2020 年 2 月 18 日
編集済み: Matt J
2020 年 2 月 18 日
3 件のコメント
Matt J
2020 年 2 月 18 日
There are lots of indexing techniques described at the link I gave you. For example, you can get every 3rd element with this syntax,
x=rand(1,137);
y=x(1:3:end);
You can also get all elements satisfying some condition with logical indexing, e.g.,
y=x(x>0.5);
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!