Create a Matlab Function that averages the input signal with the simulation running in the Simulink -- No upload to workspace
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jefferson
am 7 Jun. 2023
Kommentiert: Jefferson
am 10 Jul. 2023
I need to build a matlab function that is able to average the input signal over a specific time period.
In the signal below for example, I need the matlab function to calculate the average of the signal only in the time period from 0.05 to 0.07 s.
I cannot use the send to workspace feature (using to file or to workspace), I need to do this operation while the Simulink model is running.
I cannot use this send-to-workspace feature as it will be implemented physically.
I'm a beginner and I don't know how to start
0 Kommentare
Akzeptierte Antwort
Raghava S N
am 13 Jun. 2023
Bearbeitet: Raghava S N
am 13 Jun. 2023
Hi,
Without knowing your harware target, this is the basic idea you need to implement.
The one-stop solution however is the mean block. This can be reset on a rising or falling edge. If you can extract the timestamp and trigger the mean block, you can implement the solution. What is the hardware target? Based on that the Simulink model can be designed.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!