Sam Gomari
Sam Gomari

Reputation: 765

How to get bus element information in Matlab programmatically?

Say there are Simulink buses in a model, Bus1 and Bus. How can we access the Bus1 info like which elements it has, their dimensions etc.

Upvotes: 0

Views: 2987

Answers (1)

scotty3785
scotty3785

Reputation: 7006

You can query data about buses by looking at the Signal Hierarchy or Compiled Bus Type of a signal. However it appears that if you only have a virtual bus, you can only get the signal names and not the types/dimensions etc. The compiled bus type for a virtual bus is "VIRTUAL_BUS" so no information is provided.

This page discussed how to programmatically query a signal on a bus but as stated above, you will only find information, if you have a non-virtual bus.

Upvotes: 1

Related Questions