Removing elements in an array

2 ビュー (過去 30 日間)
Bathrinath
Bathrinath 2012 年 4 月 3 日
Hi,
I want to remove the elements which has zero values.
aaa = [ 0 0 2 3 0 6 ]
I need aaa = [ 2 3 6 ]
Suggest me to get this answer.

採用された回答

Thomas
Thomas 2012 年 4 月 3 日
aaa(aaa~=0)
or
aaa(~~aaa)
  1 件のコメント
Bathrinath
Bathrinath 2012 年 4 月 3 日
Thanks

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by