How to eliminate zeros from array
古いコメントを表示
e.g I want to make this:
1,1,1,1,0,0 1,1,0,0,0,0 1,0,0,0,0,0 1,1,1,1,1,0 into this:
1,1,1,1 1,1 1 1,1,1,1,1
1 件のコメント
Jos (10584)
2018 年 3 月 14 日
Can you give a an example of these two arrays in working matlab code?
Array1 = ...
Array2 = ...
回答 (1 件)
Jos (10584)
2018 年 3 月 14 日
a(~logical(a)) = []
5 件のコメント
Sarumathi C
2018 年 3 月 14 日
Jos (10584)
2018 年 3 月 14 日
You cannot simply eliminate elements in a regular array without changing the shape, you should replace them by something else.
What do you exactly mean by " find difference between two rows " ?
Sarumathi C
2018 年 3 月 14 日
Jos (10584)
2018 年 3 月 14 日
Please use valid matlab notation for the examples ...
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!