For loops in simulink

I have a 36x5 matrix. Each column of this matrix is an input to a simulink block. I need to create a for loop for my simulink model using the matrix. For example, the first column of the matrix generates an output from the simulink block, then the second column should do the same and so on. All the output data should be sent to the workspace. What is the best way to generate this for loop? Thanks.

Respuestas (1)

KL
KL el 4 de Oct. de 2017

0 votos

data = rand(35,1);
time = 1:35;
simulink_variable = timeseries(data,time)
and then use it with a from workspace block. Similarly use a to workspace block to get the outputs?

1 comentario

Juan Nunez
Juan Nunez el 11 de Oct. de 2017
Thanks KL!!. Problem solved using your suggestion.

Iniciar sesión para comentar.

Categorías

Más información sobre Loops and Conditional Statements en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 4 de Oct. de 2017

Comentada:

el 11 de Oct. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by