Main Content

Simulink.fault.deleteConditional

Delete conditional from model

Since R2023b

Description

example

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

example

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

Examples

collapse all

Open the fault_analyzer_intro model.

openExample('faultanalyzer/FaultAnalyzerIntroExample')

Add two conditionals to the model.

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

Delete the conditionals from the model.

Simulink.fault.deleteConditional("fault_analyzer_intro");

Open the fault_analyzer_intro model.

openExample('faultanalyzer/FaultAnalyzerIntroExample')

Add two conditionals to the model.

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

Delete the conditional named myConditional1 from the model.

Simulink.fault.deleteConditional(...
"fault_analyzer_intro","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