Main Content

Simulink.fault.save

Save fault information file

Since R2024a

Description

example

Simulink.fault.save(model) saves the fault information file associated with the specified model.

Examples

collapse all

Open the fault_analyzer_intro model.

openExample('faultanalyzer/FaultAnalyzerIntroExample')

Add a fault to the Sine Wave block.

fault = Simulink.fault.addFault(...
"fault_analyzer_intro/Sine Wave/Outport/1");

Assign empty behavior to the fault and store the behavior in a fault model named myBehaviorModel on the path.

addBehavior(fault,"myBehaviorModel");

Save the fault information file associated with the model.

Simulink.fault.save("fault_analyzer_intro")

Input Arguments

collapse all

Path or handle to the model, specified as a string scalar, character vector, or model handle.

Data Types: string | char | double

Tips

  • Saving the model also saves the fault information file.

  • Deleting faults or their behavior automatically saves the fault information file. To delete a fault, use the Simulink.fault.deleteFault function. To delete fault behavior, use the deleteBehavior function.

Version History

Introduced in R2024a