How do I delete multiple elements from a column array using a while loop?
1 回表示 (過去 30 日間)
古いコメントを表示
For example if I wanted to delete every element in an array where the array is equal to 0?
0 件のコメント
回答 (1 件)
Shubham Gupta
2019 年 11 月 7 日
編集済み: Shubham Gupta
2019 年 11 月 7 日
This should do the job:
A = [1 0 1 0 1 0 1 0]';
A(A==0) = []
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!