Rounding-off zero to negative
显示 更早的评论
Is there any built-in function in matlab that takes all the negative values equal to zero? or round off negative values to zero? Regards
采纳的回答
更多回答(1 个)
Walter Roberson
2011-8-16
A = max(A,0);
But cross-check whether this gives you the behaviour you want for NaN.
类别
在 帮助中心 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!