Simulink.fault.report
Description
generates a fault specification report by using one or more name-value arguments.status
= Simulink.fault.report(model
,Name=Value
)
Examples
Generate PDF Fault Specification Report
Open the sldemo_fuelsys_fault_analyzer
model in the Evaluate Fault Combinations on a Fault-Tolerant Fuel System
example.
openExample('faultanalyzer/EvaluateFaultsForFuelSystemExample') model = "sldemo_fuelsys_fault_analyzer"; open_system(model) fuelSysFaultSetup
Generate a PDF fault specification report.
Simulink.fault.report(model);
Generate HTMX Fault Specification Report That Excludes Fault Behavior Details
Open the sldemo_fuelsys_fault_analyzer
model in the Evaluate Fault Combinations on a Fault-Tolerant Fuel System
example.
openExample('faultanalyzer/EvaluateFaultsForFuelSystemExample') model = "sldemo_fuelsys_fault_analyzer"; open_system(model) fuelSysFaultSetup
Generate an HTMX package fault specification report that excludes fault behavior details.
Simulink.fault.report(model,FileType="htmx",... IncludeBehaviorDetails=false);
Input Arguments
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
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: Simulink.fault.report("myModel",OpenAfterCreate=true)
generates a fault specification report and opens the report afterwards.
Title
— Report title
"Fault Specification Report for
MODELNAME
"
(default) | string scalar | character vector
MODELNAME
"Report title, specified as a string scalar or character vector. If you do not
specify this name-value argument, the default title is Fault Specification
Report for
, where
MODELNAME
MODELNAME
is the name of the model
Data Types: string
| char
Author
— Report author
"username
"
(default) | string scalar | character vector
username
"Report author, specified as a string scalar or character vector. If you do not
specify this property, the default value is the username of the system running
MATLAB®. To find this name, enter getenv("user")
into the
MATLAB Command Window.
Data Types: string
| char
FileType
— Exported report file type
"pdf"
(default) | "docx"
| "htmx"
Exported report file type, specified as one of these options:
Value | Description |
---|---|
"pdf" | Exports the report as a PDF file. |
"docx" | Exports the report as a Microsoft® Word document with the .docx extension. |
"htmx" | Exports the report as an HTMX zipped package. |
Data Types: enum
FileName
— Report file name
"faultSpecReport"
(default) | string scalar | character vector
Report file name, specified as a string scalar or character vector. Do not include the file extension.
Data Types: string
| char
IncludeFaultDetails
— Whether report includes fault details
true
or 1
(default) | false
or 0
Whether the report includes fault details, specified as a numeric or logical
1
(true
) or 0
(false
). For more information on faults, see Define and Model Faults.
Data Types: logical
IncludeBehaviorDetails
— Whether report includes fault behavior details
true
or 1
(default) | false
or 0
Whether the report includes fault behavior details, specified as a numeric or
logical 1
(true
) or 0
(false
). For more information on fault behaviors, see Define and Model Faults and Create Predefined and Custom Fault Behaviors.
Data Types: logical
IncludeConditionalDetails
— Whether report includes conditional details
true
or 1
(default) | false
or 0
Whether the report includes conditional details, specified as a numeric or logical
1
(true
) or 0
(false
). For more information on conditionals, see Create and Manage Conditionals.
Data Types: logical
IncludeLinkDetails
— Whether report includes link details
true
or 1
(default) | false
or 0
Whether the report includes link details attached to faults and conditionals,
specified as a numeric or logical 1
(true
) or
0
(false
). Clicking on the linked artifact in
the report opens the corresponding artifact in Simulink®. For more information on linking artifacts in Simulink
Fault Analyzer™, see Link Artifacts.
Data Types: logical
IncludeFaultTable
— Whether report includes fault table
true
or 1
(default) | false
or 0
Whether the report includes the content of the Fault Table
pane, specified as a numeric or logical 1
(true
)
or 0
(false
). For more information on the
Fault Table pane, see Enable, Modify, and Select Active Faults and Create Conditionals.
Data Types: logical
OpenAfterCreate
— Whether report opens after creation
false
or 0
(default) | true
or 1
Whether the report opens after creation, specified as a numeric or logical
1
(true
) or 0
(false
).
Data Types: logical
Output Arguments
status
— Whether report is created
1
| 0
Whether the report is created, returned as 1
(true
) or 0
(false
).
Tips
If you have MATLAB Report Generator™ or Simulink Report Generator, you can open the report by using the
rptview
(MATLAB Report Generator) function.
Version History
Introduced in R2023b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
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.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)