Shifting least negative value to zero
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
siri meka
am 1 Jan. 2022
Kommentiert: Image Analyst
am 1 Jan. 2022
Hello
So i have a graph whose values run below 0. i want to make the least point on this graph start from zero so that the subsequent values change accordingly. say -60 is the least point.. it should be zero on the graph the -20 will be at 40 and so on. please help me out.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/849550/image.jpeg)
Thank you so much
Happy New Year
0 Kommentare
Akzeptierte Antwort
KSSV
am 1 Jan. 2022
Bearbeitet: KSSV
am 1 Jan. 2022
Let x be your data.
xnew = x-min(x) ;
Als have a loon on the function rescale.
5 Kommentare
Image Analyst
am 1 Jan. 2022
Or (another way) to clip all negative values at zero
x = max(x, 0);
Now negative values will be set to 0 and positive values will remain unchanged.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graph and Network Algorithms 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!