Simulink.fmuexport.ExportSimulinkProjectToFMU
Export project as Functional Mockup Unit (FMU)
Description
Simulink.fmuexport.ExportSimulinkProjectToFMU(
exports a project
,model
,Name,Value
)project
as a Functional Mockup Unit (FMU) and sets the
model
as the main interface model.
Examples
Export Model and Set FMU Icon
If the Simulink® model EngineGasDynamics.slx
exists in the
project root/models/
folder, use the following
command to export the FMU from project root:
project = slproject.getCurrentProject;... Simulink.fmuexport.ExportSimulinkProjectToFMU(project,'models/EngineGasDynamics.slx',... '-fmuname',fullfile(project.RootFolder,'EngineGasDynamics.fmu'),... '-fmuicon',fullfile(project.RootFolder,'Simulink_Logo.png'))
Input Arguments
project
— Project to export
scalar (default)
Project to export, specified as a string.
Data Types: string
model
— Model that defines main interface
scalar (default)
Model that defines the main interface, specified as a string.
Data Types: string
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.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: '-fmuname','myFMU'
-fmuname
— The location and name of the generated FMU relative to the current working folder
string
If not specified, FMU is saved to current directory folder with the same name as the main model.
Data Types: string
-description
— The description of the generated FMU
string (default)
The information is saved in modelDescription.xml
inside
FMU.
Data Types: string
-author
— The author of the generated FMU
string (default)
The information is saved in modelDescription.xml
inside
FMU.
Data Types: string
-copyright
— The copyright of the generated FMU
string (default)
The information is saved in modelDescription.xml
inside
FMU.
Data Types: string
-license
— The license of the generated FMU
string (default)
The information is saved in modelDescription.xml
inside
FMU.
Data Types: string
-fmuicon
— An icon file for the generated FMU
string (default)
The icon file must be in PNG format. If not specified, generated FMU has no icon file.
Data Types: string
Version History
Introduced in R2018b
Comando de MATLAB
Ha hecho clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
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)