How to deal with this
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I have a large matrix that is generated in a simulation.
I have noticed that some of the columns are NAN (entire column).
Is there a way to
1) get the number of columns with NAN
2) delete the columns with NAN values
Thanks
1 个评论
Walter Roberson
2013-3-13
You are not generating code. Please read the guide to tags and retag this question. http://www.mathworks.co.uk/matlabcentral/answers/43073-a-guide-to-tags
采纳的回答
Walter Roberson
2013-3-13
find( any(isnan(YourMatrix)) )
and
YourMatrix(:, any(isnan(YourMatrix))) = [];
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Function Definition 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!