0

I'm trying to build a Simulink model containing a "s-function block" simulating a continuous process with a "Matlab Function Block" that use the input and output from s-function.

But I need the input to the "Matlab Function Block" with differents values of the same signal over time. That is, a vector with different sampling times for each input to "Matlab Function Block". This will be needed for testing identification techniques.

How could I do this?

Thank you

1 Answer 1

1

Assuming you are using a fixed-step discrete solver, and that you don't have too many values of the same signal to hold, you could use Unit Delay blocks to get the value of the signal at previous time steps. You can then mux all these signals together to form your vector input. Obviously, the practicality of it is limited by how many values of the signals you need to have (and buffer).

Sign up to request clarification or add additional context in comments.

2 Comments

Thank you for your reply. But I will use a lot of discrete sample as input to "Matlab Function Block". I was wondering if there is a command to access all signal from the simulink model.
No, you can only access each signal at each time step as far as I know.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.