matlab file as exe file
Show older comments
hi, is there a way by which can make .m file as exe file ? And then can run it even without existence matlab
Answers (1)
Fangjun Jiang
on 20 Dec 2011
0 votes
Use the MATLAB Compiler Toolbox. Build standalone executables and software components from MATLAB code
11 Comments
Walter Roberson
on 20 Dec 2011
Note: the Compiler cannot be used with MATLAB Student Version.
huda nawaf
on 20 Dec 2011
Walter Roberson
on 20 Dec 2011
There is no alternative for the MATLAB Student Version. This is one of the distinguishing differences between the Student Version ($100 or so) and the Professional Version ($2000 or so)
Fangjun Jiang
on 20 Dec 2011
For the sake of argument, the other option is MATLAB Coder, which can generate C code from .m files and then you can compile them into executable. But it's more expensive than MATLAB Compiler.
http://www.mathworks.com/products/matlab-coder/
Walter Roberson
on 20 Dec 2011
MATLAB Coder is not available for MATLAB Student Version.
http://www.mathworks.com/academia/student_version/companion.html
Fangjun Jiang
on 20 Dec 2011
Poor student version!
Walter Roberson
on 20 Dec 2011
An academic institution might happen to have an Academic Version of MATLAB and the associated MATLAB Compiler licenses. Under some conditions, the institution would be permitted to use that Compiler license to create the executable.
The restrictions of the Terms & Conditions would be in effect. Legal interpretation would be required as to what is permitted or not. My _personal_ interpretation is that if the software was being created for course work (or thesis) and the software was being distributed for internal learning purposes of the students or staff, then using an Academic license might possibly be justified.
Image Analyst
on 20 Dec 2011
My understanding, after talking with the Mathworks about it, is that if your organization (company, university, government organization, whatever) bought your compiler for you then you can use your compiler license to compile executables for anyone else in your organization. The Mathworks know we do that, and are okay with it, and in fact they recommended that to us (since the compiler is way too expensive for every user to have). So if someone in your org has it, you're in luck. If not, you'd have to buy it because someone else outside your org is not supposed to compile for you (otherwise I'd quit my job and compile apps for the whole world).
Walter Roberson
on 20 Dec 2011
Right, my access to MATLAB is through licenses that were purchased by my organization for the person filling my role, not through licenses purchased for me personally. If someone else takes on my role then my organization can re-designate the authorized user. The licenses belong to the organization, not to me.
However, Student licenses belong to the individual students, not to the academic institution. Academic licenses are purchased for use of the facility and staff and research assistants, not for students there in general. A person who is researching something in conjunction with faculty or staff, for the benefit of the academic institution (but not for commercial or defense contracts that a professor had managed to land) would be entitled to use that academic license, whether that person was a student or a contract worker. But a student studying for the benefit of the student would not (as best I can tell) be entitled to use an Academic license.
In the case of a commercial company, the IP (Intellectual Property) associated with any piece of software is owned by the company ("work for hire"), so the references to "you" or "your" in the Terms & Conditions become references to the company: the company is entitled to compile software for its own benefit. The license terms might still require that a particular _person_ do the compiling ("named user license") but they would not (hypothetically) be restricted to compiling code that they personally wrote.
This is why I wrote above about the software being distributed for internal learning purposes: then the hypothetical academic compiler license would be being used for the benefit of the owning organization. The matter does get a bit fuzzy over IP rights.
huda nawaf
on 25 Dec 2011
Walter Roberson
on 25 Dec 2011
You can make calls to an installed version of MATLAB from Visual Basic, or you can use MATLAB Builder NE to produce .NET objects.
MATLAB Builder NE is not available for the Student Version, and has (I believe) the same restrictions on who can use it for what purposes as MATLAB Compiler has.
Categories
Find more on MATLAB Compiler in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!