Is it possible to execute compiled code both inside and outside the environment from MATLAB?

Let me explain what I'm trying to do. I have an application encoded in Matlab, and I would like to provide it to both Matlab users and non-Matlab users. So you would say: just compiled it and deployed the executable. Good.

But the deployed application is somehow limited by what you can do (very important, you cannot execute another M file), so I would also like Matlab users to be able to run the deployed application from within Matlab and provide these advanced features for these guys . So maybe?

Of course, I could provide two versions: .exe and .m, but this is not very elegant, and perhaps there is a good trick. Any ideas?

+3
source share
2 answers

You can use evalin deployed applications. You can also read files .m, as they are nothing more than text. So read the file, evaluate line by line, and there you go, you have the opportunity to use third-party script files .min your compiled Matlab program.

You cannot use functions in this way, only scripts.

The only thing I'm not sure is whether it is legal. I can not guarantee this, you will have to contact Mathworks yourself.

+1
source

Matlab has no built-in functions for this, and finding out if someone has Matlab installed or not is highly dependent on the operating system.

0
source

All Articles