Using variable size matrices in Simulink
1 回表示 (過去 30 日間)
古いコメントを表示
Simulink gurus!
I have a model that uses a triggered subsystem to create a new node when a set of logic conditions is met. The new node is stored in a workspace variable using the Signal to Workspace block in array format. Once that node is added, I need to use the whole, updated matrix from the workspace to run another function within the triggered subsystem, but I cannot get it to propagate the matrix beyond the one specified when I initialize the simulation. I've tried using the From Workspace, Signal from Workspace, Triggered from Workspace, and Constant blocks, and the array, structure, structure with time, and timeseries formats with no luck. Any thoughts? Thanks!
0 件のコメント
採用された回答
Guy Rouleau
2013 年 7 月 26 日
You are going in the wrong direction. Going back in the workspace is not the good approach.
Instead, create a vector in Simulink with the maximum dimension you expect for your vector. Using an assignment block, fill it. Keep it store using a Unit Delay, and gab the "filled" part using a Selector block to send to your function.
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!