Replace NaN values with blanks
古いコメントを表示
Hello all,
I need to replace the NaN values with a blank space in either a matrix or cell array. What should I do?? On trying the below code with cell array, I got the following error:
a(cellfun(@isnan,a)) = {[]}; Error: Function name must be a string.
I am using Matlab 7.0.1 (R14).
How should I give the isnan function???
Thanks in advance for the help.
3 件のコメント
Azzi Abdelmalek
2013 年 9 月 24 日
[Samyukhta commented]
I get the same error, function name must be a string. Is there any other way to give @isnan????
Azzi Abdelmalek
2013 年 9 月 24 日
[Samyukhta commented]
Hello Ilham Hardy and Azzi Abdelmalek ,
I get the same error , Function name must be a string.
What should I do???? How am I supposed to give @isnan()???
Azzi Abdelmalek
2013 年 9 月 24 日
Samyukhta , please if you want to comment an answer, click on [comment on this answer]
採用された回答
その他の回答 (1 件)
Azzi Abdelmalek
2013 年 9 月 24 日
A={nan 1 2 nan 3 'r'}
A(cellfun(@isnan,A))={''}
1 件のコメント
Azzi Abdelmalek
2013 年 9 月 24 日
In windows command type
isnan
What did you get?
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!