Picking data from graph?

2 views (last 30 days)
I have a sample signal below, I just want to retrieve the data in the red box for the next step of processing, how do I do it?
  4 Comments
Nurfaiz Fathurrahman
Nurfaiz Fathurrahman on 22 Nov 2021
is it possible to retrieve data by picking in the graph? or use another method so that it can determine the start and end?
time range is fixed, signal is input using exsisting data

Sign in to comment.

Accepted Answer

Bjorn Gustavsson
Bjorn Gustavsson on 22 Nov 2021
If you have the signal S, the corresponding sample-times t and the start and stop-times t1 and t2 you can select the signal in the intervall:
S1to2 = S(t1<t&t<=t2);
If you want to select the time-interval from the graph, have a look at the help and documentation of ginput, it is a function that allows you to select points in graphs. You could use that to select 2 points (you will/can get bot the x and y-values of selected points) to give you t1 and t2.
HTH
  1 Comment
Nurfaiz Fathurrahman
Nurfaiz Fathurrahman on 23 Nov 2021
Excellent, i tried ginput and got what i wanted, thanks a lot
Sorry late reply

Sign in to comment.

More Answers (0)

Products


Release

R2018a

Community Treasure Hunt

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

Start Hunting!