Shifting least negative value to zero

9 次查看(过去 30 天)
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.
Thank you so much
Happy New Year

采纳的回答

KSSV
KSSV 2022-1-1
编辑:KSSV 2022-1-1
Let x be your data.
xnew = x-min(x) ;
Als have a loon on the function rescale.
  5 个评论
Image Analyst
Image Analyst 2022-1-1
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Graph and Network Algorithms 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by