remove [NaN] from cell array
Show older comments
I have large cell arrays in which a couple of entries could not be read from an excel file, since the corresponding places are empty. In my cell array I obtain: [NaN]
now I wish to replace this with an empty string: ''
this is what I tried and got:
>> raw(cellfun(@isnan,raw)) = {''};
Error using cellfun
Non-scalar in Uniform output, at index 1, output 1.
Set 'UniformOutput' to false.
>> raw(cellfun(@isnan,raw,'UniformOutput',false)) = {''};
Error using subsindex
Function 'subsindex' is not defined for values of class 'cell'.
suggestions?
1 Comment
Jan
on 16 Apr 2015
Please post a relevant part of the cell raw such that we can reproduce the problem.
Accepted Answer
More Answers (0)
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!