I would like to replace NaN value (in 1 row and 306 columns ) instead of empty matrices inside a cell array of 6804 elements
2 次查看(过去 30 天)
显示 更早的评论
I had attached a screen shot of my cell array. I need to replace 1*306 double NaN values instead of empty [] cells. Any help would be appreciated. Thank you so much in advance.
I tried the following code:
c= 6804*1 cell
empties = cellfun('isempty',c);
c(empties) = {NaN};
But it just replace the empty cell with single NaN value
0 个评论
采纳的回答
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!