Passing one by one values of matrix in Simulink

조회 수: 4 (최근 30일)
Brince Babu
Brince Babu 2022년 6월 1일
답변: Fangjun Jiang 2022년 6월 1일
I have a matrix in workspace of 1142*1 size.I have to use this matrix values in Simulink in such a way that i have to pass each of the values of this 1142*1 size matrix one by one at a specified rate of .01 sec time interwal to Ros.Can someone explain how to do this one by one passing of values at specified rate in Simulink.

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2022년 6월 1일
Data=(1:1142)';
time=0.01*(0:1141)';
Use the "From Workspace" block in your Simulink model, specify the data as [time, Data], then you have imported your workspace data to the Simulink model, where it can be used any way that is proper in Simulink.

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by