MATLAB: How to specify symbolic dimensions for an element in the bus

busdimensionselementsimulinksymbolic

I am trying to use a variable to set the dimensions of an element in bus. I am using the Bus Editor to do this using the variable "myvar":

But I get an error saying "Unrecognized function or variable". What am I doing wrong?

Best Answer

You can do this in the Bus Editor, but you need to put single quotes around the variable name as follows:
You can also do this from the command line:
>> BusObject.Elements(1).Dimensions = 'myvar';