Importing Array Of Structure To Simulink
3 views (last 30 days)
Show older comments
Hello,
I have an array of structure S in my base work space.
S = 3 X 1 Struct S(1,1), S(2,1) and S(3,1)
Each structure has 3 elements. S(1,1).A, S(2,1).A, S(3,1).A S(1,1).B, S(2,1).B, S(3,1).B S(1,1).C, S(2,1).C, S(3,1).C
I want to import the structures to simulink based on an index.
For Example, when index = 1, I want the model to use S(1,1).A, S(1,1).B, S(1,1).C For next iteration, the model should use S(2,1).A, S(2,1).B, S(2.1).C and so on.
The Initial state (Input to the Model) is always State1, but after that its based on the destination state (Configurable to be 2 or 3).
So for example if the user configures the transition to be from State 1 to State 3, The model should read S(3,1).A, S(3,1).B etc.
Hope I have explained the question properly. Please flag, if anything is not clear.
Thanks a lot in advance.
0 Comments
Answers (0)
See Also
Categories
Find more on Structures 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!