Cant use nested bus objects with bus object arrays in simulink
Hello,
I am trying to build a Bus (struct) (<Quiver>) that has an array of a nested bus type (<Arrow>). Later, I want to dissect this array (<arrows>), loop over it and use the members (<point>, <head>) of that bus object.
However, I get the following error:
Selected signal ‘arrows.origin.x’ in the Bus Selector block ‘Demo/Inport’ is invalid since it refers to a bus element within an array of sub-buses. The path to the array of sub-buses is ‘arrows’. Please select the appropriate array element using a Selector block before using the Bus Selector block to access an element within the bus.
This is very annoying. Programatically this is totally normal, nested stucts. Why can I specify the dimension of that struct array, if it wont compile?
How can I do what I intend to do?
This is what I am doing, basically:Hello,
I am trying to build a Bus (struct) (<Quiver>) that has an array of a nested bus type (<Arrow>). Later, I want to dissect this array (<arrows>), loop over it and use the members (<point>, <head>) of that bus object.
However, I get the following error:
Selected signal ‘arrows.origin.x’ in the Bus Selector block ‘Demo/Inport’ is invalid since it refers to a bus element within an array of sub-buses. The path to the array of sub-buses is ‘arrows’. Please select the appropriate array element using a Selector block before using the Bus Selector block to access an element within the bus.
This is very annoying. Programatically this is totally normal, nested stucts. Why can I specify the dimension of that struct array, if it wont compile?
How can I do what I intend to do?
This is what I am doing, basically: Hello,
I am trying to build a Bus (struct) (<Quiver>) that has an array of a nested bus type (<Arrow>). Later, I want to dissect this array (<arrows>), loop over it and use the members (<point>, <head>) of that bus object.
However, I get the following error:
Selected signal ‘arrows.origin.x’ in the Bus Selector block ‘Demo/Inport’ is invalid since it refers to a bus element within an array of sub-buses. The path to the array of sub-buses is ‘arrows’. Please select the appropriate array element using a Selector block before using the Bus Selector block to access an element within the bus.
This is very annoying. Programatically this is totally normal, nested stucts. Why can I specify the dimension of that struct array, if it wont compile?
How can I do what I intend to do?
This is what I am doing, basically: array, bus, simulink, matlab, error MATLAB Answers — New Questions