Simulink - How to store a scalar in a queue with simulation time?

2 ビュー (過去 30 日間)
JAI PRAKASH
JAI PRAKASH 2021 年 2 月 22 日
編集済み: JAI PRAKASH 2021 年 2 月 23 日
I am trying to make a FIFO queue with time-stamps (simulation time).
Queue would have a max length.
I tried 'to workspace' and 'from workspace' combination. it doesn't work.
Intial values could be zero or dynamics size array till maxlength.
  2 件のコメント
M.B
M.B 2021 年 2 月 22 日
Can you explain what you are trying to achieve? What are the inputs/outputs (type, dimension ...) of your system?
"To workspace" will recorde the signal during simulation. You can set it to record signals as timeseries (data + simulation time). The data is only accessible at the end of the simulation in the workspace.
JAI PRAKASH
JAI PRAKASH 2021 年 2 月 22 日
Thanks MB for your consideration.
I will fed this history to a MATLAB Fn block, which needs this previous time history during the simulation. Data type is double and dimension is in the figure. (N, say 50). I require time history during simulation.

サインインしてコメントする。

回答 (1 件)

JAI PRAKASH
JAI PRAKASH 2021 年 2 月 23 日
編集済み: JAI PRAKASH 2021 年 2 月 23 日
Here I attach the solution, which my collegue found.

カテゴリ

Help Center および File ExchangeProgrammatic Model Editing についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by