How to put values to zero within a specified range?

11 vues (au cours des 30 derniers jours)
Sam
Sam le 6 Jan 2015
Réponse apportée : Amit le 6 Jan 2015
I've got a datatype 31x1 double. I want to put the values between -0.5 and + 0.5 to zero. How do I do this?

Réponses (1)

Amit
Amit le 6 Jan 2015
Lets say your data variable is A then:
A(A>-0.5 & A < 0.5) = 0;

Catégories

En savoir plus sur Interactive Control and Callbacks dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by