MATLAB: Can I split the fields of a Simulink.Structtype signal into separate signals in Simulink 7.2 (R2008b)

elementfieldsignalsimulinkstructtypestructure

I am using a signal of type Simulink.Structtype to interface with an S-function in Simulink. The output is also of type Simulink.Structtype, but I would like to split the fields into separate signals, so that I can use them in the remainder of my model. Is there a block which does this?

Best Answer

You can gain this functionality through the use of an S-function. The way to do this is to create another S-function whose purpose would be to select the signals of interest from the StructType and output them/it as such. There are no ‘selectors’ for the StructType signal. You may wish to use a bus and bus-selector block