Borrar filtros
Borrar filtros

Create a Matlab Function that averages the input signal with the simulation running in the Simulink -- No upload to workspace

4 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Raghava S N
Raghava S N el 13 de Jun. de 2023
Editada: Raghava S N el 13 de Jun. de 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.

Más respuestas (0)

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by