How to replace numbers in an array
54 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
zhe li
le 8 Nov 2011
Commenté : maede parishani
le 15 Fév 2023
Could anybody help me solve the problem please? I have a sample array a=[3 2 5 7 4 8 2 5], I would like to replace all numbers greater than 5(>5) to be 5, the expected result should be a=[3 2 5 5 4 5 2 5]. Thank you very much.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Type Identification 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!