Multiples of 5
古いコメントを表示
Hi, ive got an array of numbers and i want to delete the array values whose index is a multiple of 5. How can i do this?
採用された回答
その他の回答 (1 件)
Andrei Bobrov
2012 年 5 月 26 日
x - your array
out = x(rem(x,5) ~= 0)
2 件のコメント
Walter Roberson
2012 年 5 月 26 日
It is the _index_ whose value is a multiple of 5 that is to be affected, not according to the value of the array.
It seems likely to me that this task is homework, so I have refrained from giving the very short and simple solution.
Edward
2012 年 5 月 30 日
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!