How to remove negative value at the out put..

Answers (1)

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

i am doing in SImUlInk, not in the script.
Here, i have attached simulink model and the value " k " must be taken from the workspace which was the data of excel 5th coloumn i.e. load. here i am attaching the simulink model also.
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.
Here, i have attached simulink model and the value " k " must be taken from the workspace which was the data of excel 5th coloumn i.e. load
The second code is actually so good. I used it in my coursework. Thank you!!

Sign in to comment.

Categories

Find more on Simulink in Help Center and File Exchange

Products

Tags

No tags entered yet.

Asked:

on 24 Apr 2015

Commented:

on 20 Mar 2020

Community Treasure Hunt

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

Start Hunting!