Is there a way to disable plotting in Compiled Matlab code (using MCR)

4 次查看(过去 30 天)
I have some compiled matlab code I'd like to run in a batch mode. Is there any way to disable all plotting functionality when running the code, or do I have to recompile everything?

回答(1 个)

Jeff E
Jeff E 2015-4-2
The function ISDEPLOYED returns true when run in the MCR, false when run in Matlab
So,
if ~isdeployed
plot([1 2] , [2 3])
end

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by