Products & Services Solutions Academia Support User Community Company

eml.target - Determine Embedded MATLAB code generation target

Syntax

[y =] eml.target

Description

[y =] eml.target returns a string representing the Embedded MATLAB code generation target.

StringDescription
''Function is executing in MATLAB
'rtw'Real-Time Workshop target
'sfun'S-function target (Simulation target)
'mex'MEX-function target
'hdl'Stateflow® HDL Coder target

Example

Use eml.target to parameterize your Embedded MATLAB functions that use custom C code so that they work in MATLAB or MEX.

if isempty(eml.target)
    % running in MATLAB
else
    % running in Embedded MATLAB
end

See Also

eml.ceval

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

 © 1984-2009- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS