How to remove negative value at the out put..
Show older comments
Please help me friends.. how to get rid of this negative values..?
Answers (1)
Image Analyst
on 24 Apr 2015
What does "get rid of" mean? Do yoiu want to change the limits of the y axis? Do you just want to get new data values by subtracting the min from all your data:
y = y - min(y);
Do you just want to remove negative values from the data:
y(y<0) = [];
5 Comments
nani kalyan
on 24 Apr 2015
nani kalyan
on 24 Apr 2015
Image Analyst
on 24 Apr 2015
OK. I removed your Matlab tag and added the Simulink product above so people will know. I don't have Simulink. Perhaps people who do will know what "get rid of" means in the Simulink environment. I could only think of the 3 possibilities I listed (changing the scale, translating upwards, or deleting), though I guess you could also clip them to zero also. Anyway, let's hope it's crystal clear to Simulink users like yourself.
nani kalyan
on 24 Apr 2015
Jakey Wang
on 20 Mar 2020
The second code is actually so good. I used it in my coursework. Thank you!!
Categories
Find more on Simulink in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!