Is there an "isdeploy" function for matlab coder?

1 回表示 (過去 30 日間)
ayana
ayana 2014 年 4 月 24 日
回答済み: Ryan Livingston 2014 年 4 月 24 日
my script is a little diffrent for c++ and matlab.. I need to know who is calling the lib for that.
I know that exe files that was made by matlab compiler has the isdeploy function, but it doesnt work for dll generated from MATLAB coder.. Is there something else for that?

回答 (1 件)

Ryan Livingston
Ryan Livingston 2014 年 4 月 24 日
Yep, you can use coder.target('MATLAB'):
to detect if your code is running in MATLAB or for code generation like so:
if coder.target('MATLAB')
% Code for MATLAB execution
else
% Code for MATLAB Coder
end
There are other situations which can be detected using coder.target as well. You can see the link above for them.

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by