how to refine data?
3 次查看(过去 30 天)
显示 更早的评论
Let's say I have a data matrix as:
a=[1,1,1,1,1;1,0,1,1,0;0,0,0,1,1;1,0,1,0,1];
Now, what I want is to get rid of the zeroes, yet not messing up my matrix. As of I need values stay at their corresponding rows. Reason I want it is due to my original data having 0 and I need to calculate log of each values in the row. Ln(0) simply is messing my code for obvious reason.
Will really appreciate the help!
2 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!