フィルターのクリア

How to eliminate zeros from array

1 回表示 (過去 30 日間)
Sarumathi C
Sarumathi C 2018 年 3 月 14 日
編集済み: Birdman 2018 年 3 月 14 日
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)
Jos (10584) 2018 年 3 月 14 日
Can you give a an example of these two arrays in working matlab code?
Array1 = ...
Array2 = ...

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

回答 (1 件)

Jos (10584)
Jos (10584) 2018 年 3 月 14 日
a(~logical(a)) = []
  5 件のコメント
Jos (10584)
Jos (10584) 2018 年 3 月 14 日
Please use valid matlab notation for the examples ...
Birdman
Birdman 2018 年 3 月 14 日
編集済み: Birdman 2018 年 3 月 14 日
And maybe this should be a new question since it is hard to pay attention to this between comments, also you are off the topic of the question.

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

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by