this
Access chart data during simulation
Syntax
Description
this provides external MATLAB® code, such as functions and apps, access to chart data during simulation.
For charts in Simulink® models, external MATLAB code can access inputs, outputs, and local data.
For standalone charts in MATLAB, external MATLAB code can access local data and call
step, input event functions, and graphical and MATLAB functions in the chart. For more information, see Execute a Standalone Chart.
Note
In charts in Simulink models, the keyword this is supported only as
an argument to external MATLAB code. Any other use of the keyword in the chart results in a
compile-time error.
Examples
Tips
Do not use the keyword
thisto access chart data after simulation has stopped.Calling an external function named
thisfrom a chart disables the keywordthisthroughout the chart. To use the keyword, rename the extrinsic function.
Version History
Introduced in R2020b

