faults = Simulink.fault.findFaults(model)
finds the faults in the model, model. The function returns the faults
alphabetically by name. If two or more faults on different model elements have the same
name, the function returns those faults alphabetically by model element path.
faults = Simulink.fault.findFaults(model,property=value)
finds the faults filtered by the Fault object property,
property, that match the value, value. The
function returns complete and partial matches.
openExample('faultanalyzer/EvaluateFaultsForFuelSystemExample')
model = "sldemo_fuelsys_fault_analyzer";
open_system(model)
fuelSysFaultSetup
Add a fault named map_fault to the model.
Simulink.fault.addFault(...
model + "/To Controller/Inport/3",Name="map_fault");
Three faults in the model contain the substring map_fault. To
retrieve only the map_fault fault, use a regular expression in the
Name name-value argument.
model — Path or handle to model string scalar | character vector | handle
Path or handle to the model, specified as a string scalar, character vector, or model
handle.
Data Types: string | char | double
property — Name of property property of Fault object
Name of the property, specified as a property of the Fault object.
For more information on Fault object properties, see
Properties.
value — Value of property format determined by property
Value of the property, specified in the format determined by the property. You can
define this argument by using a regular expression. For more information on using
regular expressions in MATLAB®, see Regular Expressions.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.