Create a Bus that can store a Matrix

1 view (last 30 days)
Aljoscha
Aljoscha on 24 Jun 2013
Hi, Is there a way to define a bus that stores a Matrix? So that I can access it like: MyBus.MyMatrix(1,2).
Also, is it possible to have a Bus that contains an array of Buses? Say my Main-Bus is called 'Traffic' and it contains an Array of Buses, each called 'TrafficObject'. This 'TrafficObject' has the property (a double) velocity. I want to access the velocity of the second TrafficObnject like this: Traffic.TrafficObject(2).velocity.
Its very important for me to access the Objects via indices, because I may have over hundred objects which I don't want to access via name.
I tried to do sth. with the property 'dimension' in the Bus editor, but I don't know if it works and how to add elements.
Thanks a lot!!

Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!