Create a Matlab Function that averages the input signal with the simulation running in the Simulink -- No upload to workspace
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposta accettata
Raghava S N
il 13 Giu 2023
Modificato: Raghava S N
il 13 Giu 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.
Più risposte (0)
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!