Check model compatibility with code inspection
checks a model for compatibility with Simulink®
Code Inspector™, returns results information, and displays the results in the Command
Window based on the settings specified in name-value pair arguments. To specify
whether the scope of the compatibility check encompasses referenced models, use the
results
= checkCompatibility(cfgObj
,Name,value)setFollowModelLinks
function.
Run compatibility checker and display the checks results in the Command Window.
Create a configuration object for model
slcidemo_roll_orig
config = slci.Configuration('slcidemo_roll_orig');
Run the compatibility checker by using the configuration object.
result = checkCompatibility(config, 'DisplayResults','None');
See the compatibility checks results.
for i = 1:length(result) fprintf('\nModel ''%s'' passed %d checks with %d issues.',... result{i}.system,... result{i}.numPass, result{i}.numWarn + result{i}.numFail) end
Model 'slcidemo_roll' passed 68 checks with 0 issues.>>
Before running Simulink Code Inspector on a model, run compatibility checks and modify the model repeatedly until the model is compatible with code inspection.
In the model window, on the Apps tab, select Code Inspector. Use the Simulink Code Inspector dialog box, to configure and run the compatibility checker. You can run the compatibility checker for a top model hierarchy by clicking Check this model.