MATLAB: Am I unable to access the “InheritDataSize” property using the Stateflow API in Stateflow 6.4 (R2006a)

inheritdatasizeinheritdatatypeiscomplexparametersstateflow

When I execute the following commands:
sf_car
rt = sfroot;
chart = rt.find('-isa','Stateflow.Chart')
data = chart.find('-isa','Stateflow.Data');
data(1).InheritDataSize
data(1).InheritDataType
data(1).IsComplex
I receive the following error:
??? No appropriate method or public field InheritDataSize for class Stateflow.Data.
I also receive a similar error when I try to access "IsComplex" and "InheritDataType" properties.

Best Answer

This is an error within the documentation for Stateflow within the Data Properties section. These properties no longer exist. Similar information can be accessed as follows:
For InheritDataSize, using the following:
data(1).Props.Array.Size
Where a result of '-1' means 'Inheirited'. For InheritDataType, use the following
data(1).Props.Type.Method
Where the results can be any of the following depending on the type: {'Built-in','Bus Object','Expression','Fixed point','Inherited'}. For IsComplex, use:
data(1).Props.Complexity
Where the results can be any of the following: {'Inherited', 'On', 'off'}.