How can I output singular element of an array from workspace to simulink per second simulation time?

조회 수: 9 (최근 30일)
I am trying to output elements of a 96x1 array in Simulink. But I want to be able to do this at the rate of one element per second (simulation time). Please can anyone describe how to go about this to me?

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2020년 6월 24일
편집: Fangjun Jiang 2022년 2월 7일
Assume your data is: data=(1:96)'/100
Create a time vector: time=(0:95)'
Use a "From Workspace" block, specify the data as [time, data]. Use a Scope block, run simulation for 100 seconds and verify the data.
  댓글 수: 2
Akinkunmi Adegbenro
Akinkunmi Adegbenro 2020년 6월 26일
편집: Fangjun Jiang 2022년 2월 7일
What did you mean by "data=(1:96)'/100"? Why did you use '/100? Just need to clarify this as I am not sure if that is key to the solution.
Fangjun Jiang
Fangjun Jiang 2020년 6월 26일
Trying to make the data value different than the time value so easy to tell what is what.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by