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 commentaires

Walter Roberson
Walter Roberson le 22 Nov 2021
What information do you have about the location of the red box?
Is the original signal still available, or only the graph of the signal ?
Nurfaiz Fathurrahman
Nurfaiz Fathurrahman le 22 Nov 2021
Modifié(e) : Nurfaiz Fathurrahman le 22 Nov 2021
I don't really understand what you mean, but
x = time
y = amplitude
The signal above is just an example, the original signal is still available
let's say I have a signal in the time domain as above, in the processing that I do I will not use all the signals, so I will take the data x and y in a certain time as in the red box to do further processing
sorry for bad english
Walter Roberson
Walter Roberson le 22 Nov 2021
How should the program know where to start extracting? How should the program know where to stop extracting ?
Is the time range fixed? Have the times been input by the user? Does the program need to detect the first minima and extract everything to the sixth minima ?
Nurfaiz Fathurrahman
Nurfaiz Fathurrahman le 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

Connectez-vous pour commenter.

 Réponse acceptée

Bjorn Gustavsson
Bjorn Gustavsson le 22 Nov 2021

0 votes

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 commentaire

Nurfaiz Fathurrahman
Nurfaiz Fathurrahman le 23 Nov 2021
Excellent, i tried ginput and got what i wanted, thanks a lot
Sorry late reply

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Exploration dans Centre d'aide et File Exchange

Produits

Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by