Configure MATLAB Function block properties programmatically
The MATLABFunctionConfiguration
object controls the
MATLAB Function block properties such as description, sample time, and the
function script. You can create a configuration object using get_param
and
change the property values of the object using dot notation.
myMFBConfigobj = get_param(gcb, 'MATLABFunctionConfiguration')
creates a MATLAB Function block configuration object for the selected
MATLAB Function block.
This example creates a MATLAB Function block configuration object using
the 'sldemo_radar_eml'
model.
open_system('sldemo_radar_eml') myMFBConfig = get_param('sldemo_radar_eml/MATLAB Function','MATLABFunctionConfiguration'); myMFBConfig.Description = 'Radar data processing tracker using Extended Kalman';