필터 지우기
필터 지우기

For loops in simulink

조회 수: 3 (최근 30일)
Juan Nunez
Juan Nunez 2017년 10월 4일
댓글: Juan Nunez 2017년 10월 11일
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.

답변 (1개)

KL
KL 2017년 10월 4일
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
Juan Nunez
Juan Nunez 2017년 10월 11일
Thanks KL!!. Problem solved using your suggestion.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by