How can I change all values in a matrix above a threshold to a different number?
23 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Brian Hickman
am 4 Sep. 2018
Beantwortet: Image Analyst
am 4 Sep. 2018
The dataset I am working with contains some elements with very high values occurring due to artifact during measurement. Is there a way to take all elements in an array greater than value X and change them to value X?
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 4 Sep. 2018
Try this:
signal = min(signal, X);
Or you can do this
signal(signal > X) = X
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multidimensional Arrays finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!