How do I remove NaN values from a cell array?
1 次查看(过去 30 天)
显示 更早的评论
I'm editing some code I was given to read in spreadsheet data collected in the field into Matlab. Some of the cells in these spreadsheets are merged, and so when I read those in, I get cells that look like ['number' 'NaN' 'number' 'NaN' ...]. I want to convert the cells to matrices, but cell2mat doesn't work when the cells contain data other than numbers. I'm trying to use "rmmissing", but get the following error:
I suppose the obvious solution would be to unmerge the cells in the spreadsheets, but there's a lot of them, and I want to see if there's a quicker way I can do this in Matlab once that data is imported.
0 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!