Create a Bus that can store a Matrix

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!!

Réponses (0)

Catégories

En savoir plus sur Modeling dans Centre d'aide et File Exchange

Produits

Question posée :

le 24 Juin 2013

Community Treasure Hunt

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

Start Hunting!

Translated by