How to plot sudden rise or fall for a set of data points?

Good Morning,
I am using following functions to read data and time
t=NUM(:,1); data=NUM(:,2);
data consists noise and sudden increase and decrease data points. I need to find these points and plot. I used filter function and took difference of data points and able to do manually. I need to plot them automatically without any assumptions. Can someone give me any suggestion.
Cheesrs

3 Comments

I have 600 data points. In these data points, at 167 data point has a sudden rise and 300 data point has a sudden fall and 400 point has again sudden rise. I want to plot at those peaks. I there any function to plot automatically.
Cheers
The term sudden defines, rise or fall in data value..
Cheers
You indicated that the data is noisy. There will be rises and falls all over the place, even after the filtering, so you need to define which rises and falls are "sudden". In the noise part, they are likely to all be "sudden" on the scale of the noise.
If you can define a particular magnitude or relative magnitude that you would consider to be sufficient to be a sudden change, then it can be programmed. (It will, though, be an "assumption".)

Sign in to comment.

 Accepted Answer

You cannot do this automatically without any assumptions. You need to define what "sudden" means in this context, as it has no objective meaning.

2 Comments

Greetings all,
For me, I have a similar image data where the background is black and the objects of interest are in gray/white. These objects of interest are well aligned vertically and horizontally, causing 'sudden rise'=object in interest, and 'sudden fall'=background.
So, for my data, it have an objective meaning, and I would like to get the values for those sudden rise and falls...thanks in advance
Look for when diff() of the pixels becomes sufficiently positive (start of an object) or sufficiently negative (end of an object).

Sign in to comment.

More Answers (0)

Products

Tags

Community Treasure Hunt

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

Start Hunting!