Rounding-off zero to negative
Afficher commentaires plus anciens
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
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 16 Août 2011
A = max(A,0);
But cross-check whether this gives you the behaviour you want for NaN.
Catégories
En savoir plus sur Creating and Concatenating Matrices dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!