how to break the data? and get them into new variable.
1 view (last 30 days)
Show older comments
I have all the data, which has the blue plot in the pic. And I want to brake it to several parts. I want to get the peak value of these four highlighted and I want to get these 4 descending array of data, means I want to get each set of data that start from peak and end to zero. And I will define them to a new vector.
<<
<<
>>
>>
Answers (1)
Image Analyst
on 31 Jan 2014
Threshold the signal at 300.
above300 = signal > 300;
Then use diff to find the location of all the starting peaks.
starts = find(diff(above300) == 1);
Then use a for loop on each peak to "climb" the peak. Then use a for loop and if you can "fall" down the peak all the way to zero without hitting an element that climbs again, then take that section. I assume you know how to do for loops and don't need me to do it for you.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!