Using variable size matrices in Simulink
1 view (last 30 days)
Show older comments
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 Comments
Accepted Answer
Guy Rouleau
on 26 Jul 2013
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.
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!