Generating Standalone Executable file Using Matlab Coder
이전 댓글 표시
Hi,
I want to create a Standalone executable file from my Matlab code. I used "mcc" command and I got the exe file, but it just works on the computers which have Matlab. I want an Executable file to work on the computers without Matlab installed.
I tried using Matlab Coder to generate C++ code from my matlab code. I found that for some sort of functions such as "plot". We need to call them as the Matlab extrinsic function which means still we need Matlab on the computer to run the standalone executable file.
Could you please advise me how I can generate standalone executable file from my Matlab code in a way that it works on the computer without Matlab installed?
Thanks, Mohammadreza
채택된 답변
추가 답변 (5개)
Dr. Seis
2011년 12월 8일
편집: John Kelly
2013년 11월 13일
1 개 추천
After packaging your standalone following these steps, does it still not work on a non-Matlab machine?
I have run into issues associated with dynamically linked libraries, but all of the computers that run my standalone programs can access it at run-time provided I supply the path to its location (so it isn't as big a deal).
댓글 수: 4
Mohammadreza
2011년 12월 8일
Tom Egginton
2015년 11월 25일
Is it because you are running a 32-bit operating system? I had a similar problem until I ran it on my 64-bit laptop and then it worked no problem
Todd Flanagan
2017년 8월 18일
Added this answer to the other one describing the two products together. Both bits seem helpful.
user86753
2022년 7월 27일
Hi Walter, the tutorial has been moved, do you have an updated link?
Peyman Obeidy
2016년 12월 17일
0 개 추천
can we do this for scripts or you can only make standalone from GUI?
댓글 수: 2
Walter Roberson
2016년 12월 17일
Earlier versions of MATLAB could not compile scripts; newer ones can. However, it compiles it by effectively adding on a "function" heading with a function name the same as the script file name. MATLAB Compiler is happy to compile routines that do not use graphics; it could always do that for functions that did not happen to use graphics, and as mentioned above it can now do so for scripts that do not happen to use graphics.
MATLAB does not distinguish between "figure" and "GUI": as far as MATLAB is concerned, every figure window is a GUI and every GUI is a figure window.
Perhaps what you are trying to refer to is "console apps", where no graphics is created and any interaction happens at the command line using text only. For that, generate it as a "standalone application" but not as "standalone application without console window". If you were using mcc then you would use the -m option but not -e .
Peyman Obeidy
2016년 12월 17일
Thank you, Walter, I save the script as a function and package it. It is working fine.
Best regards Peyman
reeva M
2017년 9월 30일
편집: Walter Roberson
2017년 10월 9일
x=-pi:0.01:pi;
y=sin(x);
subplot(2,4,1);
plot(x,y);
title('sine wave');
Mahalakshmi Venkatesh
2017년 10월 9일
편집: Walter Roberson
2017년 10월 9일
When I try the 'guide ImpulseResponseAnalysis' command, I et the following error:
Error using guide (line 134)
File 'ImpulseResponseAnalysis.fig' not found.
Is there a way around this? :)
Many Thanks,
Mahi
댓글 수: 1
Walter Roberson
2017년 10월 9일
ImpulseResponseAnalysis.fig does not appear to have been provided with MATLAB and does not appear to be in the File Exchange, and I do not find it anywhere online. If you are trying to create a new GUI by that name, just start up guide, create a GUI, and tell guide to save it under that name.
Ridvan Taskiran
2018년 5월 3일
0 개 추천
hi . I need help about this application. I prepared application but when I started it, it waiting on the screen and nothing happen. How can I solve this problem?
카테고리
도움말 센터 및 File Exchange에서 MATLAB Coder에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!