how to hold max amplitude of a signal until next amplitude value is bigger?
8 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
for a signal with varying amplitude, I need to find max amplitudes and hold that max value untill another max value is detected. the hold can be i.e for 1000 samples, if not max value is detected after 1000 samples it should slowly go back to its original position as shown in figure. can anybody help how to do that in simulink?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166428/image.jpeg)
0 Kommentare
Antworten (1)
Image Analyst
am 30 Jul. 2017
Bearbeitet: Image Analyst
am 30 Jul. 2017
Take a look at the boundary() and envelope() functions. Try them and write back, attaching your data and code, if you can't figure out the parameters to use with them. Anyway, that's what I'd do in MATLAB. I don't have Simulink so I don't know if you can do that in Simulink, or if Simulink has better approaches.
2 Kommentare
Image Analyst
am 30 Jul. 2017
"if you have Matlab, you must have simulink also." Absolutely not true. If you have a student suite, you get both, but I have a professional license for MATLAB only.
Try movmax() instead.
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!