Determining whether a file is compiled (in exe ') or not in matlab

So, I have a piece of MATLAB code that I am compiling in exe. This exe file should be used by people who do not have MATLAB installed. But the original m file is also used by some advanced users. There are some functions that I cannot provide in a compiled version of exe. My problem is that I want to keep the same code for exe and m of the original. To do this, I want my code to automatically detect if the executable is an exe or m file so that I can disable some function for the exe version simply using the if statement. Is there any way to do this ???

+4
source share
1 answer

I think you are looking for an isdeployed function

+7
source

Source: https://habr.com/ru/post/1438292/


All Articles