how to refine data?
3 views (last 30 days)
Show older comments
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 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!