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)) = [];

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 NaNs에 대해 자세히 알아보기

질문:

2013년 3월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by