Main Content

Simulink.fault.deleteConditional

Delete conditional from model

Since R2023b

Description

Simulink.fault.deleteConditional(model) deletes the conditionals from the model, model.

example

Simulink.fault.deleteConditional(model,name) deletes the conditional with the name, name.

example

Examples

collapse all

Open a model with a block that supports fault modeling.

openExample('simscape_shared/SimpleMotorArmatureWindingFaultExample')

Add two conditionals to the model.

fault_conditional_1 = Simulink.fault.addConditional(...
"SimpleMotorArmatureWindingFault","myConditional1","y1 >= 0");
fault_conditional_2 = Simulink.fault.addConditional(...
"SimpleMotorArmatureWindingFault","myConditional2","y1 < 0");

Delete the conditionals from the model.

Simulink.fault.deleteConditional("SimpleMotorArmatureWindingFault");

Open a model with a block that supports fault modeling.

openExample('simscape_shared/SimpleMotorArmatureWindingFaultExample')

Add two conditionals to the model.

fault_conditional_1 = Simulink.fault.addConditional(...
"SimpleMotorArmatureWindingFault","myConditional1","y1 >= 0");
fault_conditional_2 = Simulink.fault.addConditional(...
"SimpleMotorArmatureWindingFault","myConditional2","y1 < 0");

Delete the conditional named myConditional1 from the model.

Simulink.fault.deleteConditional(...
"SimpleMotorArmatureWindingFault","myConditional1");

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

Name of the conditional, specified as a string scalar or character vector. Each conditional name in the model must be unique.

Data Types: char | string

Version History

Introduced in R2023b