Filter löschen
Filter löschen

How can I determine the x-value of a sudden change in y-values?

9 Ansichten (letzte 30 Tage)
I want to determine the start time and end time of that first impulse on the attached graph. I don't want to have to graph every dataset though (I have way too many) so would like to command matlab to do so from a two sets of values I've imported from excel. Does anyone have any suggestions? I'm very new to matlab.

Akzeptierte Antwort

Star Strider
Star Strider am 10 Jan. 2018
Bearbeitet: Star Strider am 10 Jan. 2018
It would help to have your data, and more detail about the features of your waveform you want to recover.
The findchangepts (link) or cusum (link) functions could be helpful.
EDIT If you have R2017b or later, the ischange function and its friends may also work with your data.
  4 Kommentare
Julia de Lange
Julia de Lange am 11 Jan. 2018
This definitely help. Is there an easy way to just find the first major peak?
Star Strider
Star Strider am 11 Jan. 2018
That depends on what you define as ‘major’. The name-value pair arguments can help you isolate the peaks you want.
To return only one peak, use the 'NPeaks' argument:
[pks,locs] = findpeaks(Voltage, 'MinPeakDist',2000, 'NPeaks',1);
Here, only the first peak value and its index will be returned.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by