finding all the other elements of a cell vector apart from zeros and empties

2 ビュー (過去 30 日間)
Dear all,
I want to find all the elements of a cell vector apart from zeros and empties Using the command
ismember(mm,setdiff(mm,'0' ))
I find all the elements apart from zeroes. But I want to find all the elements apart from zeroes AND empty cells. Note mm is a cell of dimension 1000 by 1
thanks
  1 件のコメント
Thomas
Thomas 2012 年 6 月 4 日
can you post a small snipet of 'mm'. You say it is a cell but does it contain numbers and characters or just numbers..

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

採用された回答

Walter Roberson
Walter Roberson 2012 年 6 月 4 日
mm( ~ cellfun( @(C) isempty(C) || (ischar(C) && strcmp(C, '0')), mm ) )
  4 件のコメント
Walter Roberson
Walter Roberson 2012 年 6 月 4 日
mm( ~ cellfun( @(C) isempty(C) || (ischar(C) && strcmp(C, '0')), mm ) & strcmp(mdata1(:,6),'b1') )
antonet
antonet 2012 年 6 月 4 日
thanks!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by