how to convert matlab code to .exe file?
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Jeena
le 16 Fév 2013
Réponse apportée : mohsen
le 16 Juil 2024
hi...i have a matlab code(.m) which i want to convert to .exe.. i used deploytool to make a package which conatins .exe and MCR installer. but the .exe file created is a matlab application. It is "Application(.exe)"!!!
and it does not work with only MCR but it needs malab installed in the system.
somebody please help me with this.. i want to make a .exe file from matlab code!
1 commentaire
Azzi Abdelmalek
le 16 Fév 2013
Modifié(e) : Azzi Abdelmalek
le 16 Fév 2013
Have you checked if your .exe file works in your first computer?
Réponse acceptée
Image Analyst
le 16 Fév 2013
Please see the FAQ for a number of things you can try: http://matlab.wikia.com/wiki/FAQ#My_standalone_executable_won.27t_run_on_the_target_computer._What_can_I_try.3F
Please run your app from a console window (Start->cmd, then cd to the folder). Tell us everything in the console window that you see.
3 commentaires
Image Analyst
le 16 Fév 2013
Modifié(e) : Image Analyst
le 16 Fév 2013
Well, there you go. You did write robust code, didn't you? So that it didn't crash the program? Meaning, you did have try/catch constructs to trap errors, try to fix them, and continue? And you used exist() before you try to open any files (images, Excel workbooks, data files, .mat files, etc.)?
if ~exist(theFolder, 'dir')
warningMessage = sprintf('Error: folder does not exist:\n%s', theFolder);
uiwait(warndlg(warningMessage));
theFolder = pwd; % Default to the current working directory.
end
fullFileName = fullfile(theFolder, baseFileName);
if exist(fullFileName, 'file')
originalImage = imread(fullFileName);
else
warningMessage = sprintf('Error: file does not exist:\n%s', fullFileName);
uiwait(warndlg(warningMessage));
originalImage = zeros(240, 320); % Just make a black image so we can continue.
end
If not, then you need to learn and start using more robust, bulletproof code or else your users will complain over and over about numerous places where your code crashed. This will damage your reputation with your users.
Plus de réponses (3)
Youssef Khmou
le 16 Fév 2013
hi,
did you try mcc
doc mcc
4 commentaires
Sukshith Shetty
le 21 Juin 2021
How do I convert .m (matlab file) to .exe file without the help of Application/MATLAB Compiler Toolbox. Is there any other method. I currently don't have the resource to purchase MATLAB Compiler Toolbox. Can you please suggest me an alternate way.
Thank you
Walter Roberson
le 25 Juin 2021
For some subsets of MATLAB, you might be able to use https://github.com/ebranlard/matlab2fortran and then compile the resulting fortran.
It probably does not handle any of the toolboxes.
mohsen
le 16 Juil 2024
I want to mathworks for show the tiutorials video for conver mathlab codes to the .exe filse.
0 commentaires
Voir également
Catégories
En savoir plus sur Startup and Shutdown dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!