Effacer les filtres
Effacer les filtres

Replace 'greater than' values in a matrix

97 vues (au cours des 30 derniers jours)
Corey Bullard
Corey Bullard le 2 Mai 2012
Commenté : ahmed ALmarhabi le 27 Fév 2021
I want to look through a very large matrix and replace numbers that are larger than, say, a, with b.
Is there a simple way or a function to do this?

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 2 Mai 2012
M - your matrix
M(M > a) = b;

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by