From: alpha on
Hello!

For a signal processing application, I need to know and store the last 50 samples of an input signal.

How can I do this in SIMULINK?

Regards
From: Wayne King on
"alpha " <matlabuser(a)gmail.com> wrote in message <i2jno6$o7e$1(a)fred.mathworks.com>...
> Hello!
>
> For a signal processing application, I need to know and store the last 50 samples of an input signal.
>
> How can I do this in SIMULINK?
>
> Regards

How are you inputing your signal into your Simulink model?
Wayne
From: Phil Goddard on

If you have the Signal Processing Blockset then use the Buffer block.

Otherwise your choices are
- use 50 delay blocks and mux the output signals together to get a 50 element signal (not a recommended approach)
- write your own buffer using either an embedded MATLAB function block, or an S-Function.

Phil.
From: Nevine on
> For a signal processing application, I need to know and store the last 50 samples of an input signal.
>
> How can I do this in SIMULINK?

If you want to save the last 50 samples, you can connect the input signal to a "To Workspace" block and set the "Limit data points to last" to 50.

You can also connect the input signal to a "Scope" block and set "Limit data points to last" to 50 and select "Save data to workspace".