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

9 views (last 30 days)
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?

Answers (1)

Fangjun Jiang
Fangjun Jiang on 24 Jun 2020
Edited: Fangjun Jiang on 7 Feb 2022
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 Comments
Akinkunmi Adegbenro
Akinkunmi Adegbenro on 26 Jun 2020
Edited: Fangjun Jiang on 7 Feb 2022
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.

Sign in to comment.

Categories

Find more on Simulink in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!