How do I create a bus object from a struct in my workspace using Simulink 7.4 (R2009b)?
Show older comments
I have a structure with different datatypes in my workspace, which I want to use as a bus in Simulink. For example:
myStruct.firstField = [1 2 3];
myStruct.secondField = uint8(17);
myStruct.thirdField = 5;
Now, I want to be able to import this data into Simulink in a bus. I can import my data using constant blocks, which directly refer to fields of the structure and create a bus with these blocks. However, that is a lot of work.
Accepted Answer
More Answers (0)
Categories
Find more on Event Functions 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!