replace nan with blank

abc={1,[],'weak'} now i want to remove [] from above variable abc and give me abc={1,'weak'} only, can any one suggest me any method for it.

 採用された回答

Andrei Bobrov
Andrei Bobrov 2013 年 3 月 14 日
編集済み: Andrei Bobrov 2013 年 3 月 14 日

0 投票

out = abc(~cellfun(@isempty,abc));
or
abc(cellfun(@isempty,abc)) = [];

1 件のコメント

Amish
Amish 2013 年 3 月 14 日
Thanks i got it..... :)

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

その他の回答 (0 件)

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by