replace nan with blank

17 ビュー (過去 30 日間)
Amish
Amish 2013 年 3 月 14 日
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 日
out = abc(~cellfun(@isempty,abc));
or
abc(cellfun(@isempty,abc)) = [];
  1 件のコメント
Amish
Amish 2013 年 3 月 14 日
Thanks i got it..... :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNaNs についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by