hi, I want to find he index value of non-zero vectors in a cell array. How do I do that ? TIA

3 ビュー (過去 30 日間)
nafila aytija
nafila aytija 2017 年 10 月 23 日
回答済み: KSSV 2017 年 10 月 23 日
for example E= 4×4 cell array
[0] [1×3 double] [1×3 double] []
[0] [] [1×3 double] [1×3 double]
[0] [] [] [1×3 double]
[0] [] [] []
Then how do I find which cells if column two contains non-zero vectors?

回答 (1 件)

KSSV
KSSV 2017 年 10 月 23 日
x = cell(3) ;
x{1,1} = rand(2) ;
x{2,2} = rand(3) ;
find(~cellfun(@isempty,x))

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by