I have a cell array as follows (from an operation on imported data). I want to know the locations of the numerical data i.e. where the 17 is in the list below - i'm not interested in the []s!
V =
Columns 1 through 13
[] [] [] [] [] [17] [] [] [] [] [] [] []
etc...
I keep on getting errors such as
Error using cell/ismember>cellismemberR2012a (line 193) Input A of class cell and input B of class char must be cell arrays of strings, unless one is a string.
when trying to use functions such as find or ismember and I think the issue is that it is a cell array and not a vector?
Thanks

 採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 12 月 14 日

0 投票

a={[] [] [17] [] []}
idx=find(~cellfun(@isempty,a))

1 件のコメント

Qwerty
Qwerty 2014 年 12 月 14 日
Brilliant thanks!

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Type Conversion についてさらに検索

質問済み:

2014 年 12 月 14 日

コメント済み:

2014 年 12 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by