How to convert my gui program to an exe file?

40 ビュー (過去 30 日間)
Yucel
Yucel 2011 年 2 月 23 日
編集済み: per isakson 2018 年 3 月 15 日
How to convert my gui program to an exe file? I have Matlab 2010b and my operating system is 32-bit. The same question asked newly and someones said that you could use "deploytool". How can i use it? I'll wait for your answers...
  2 件のコメント
Walter Roberson
Walter Roberson 2011 年 2 月 23 日
Do you have a license for the Matlab compiler?
Are you using Windows?
Which compiler do you have installed? Only some very specific compilers are supported.
Yucel
Yucel 2011 年 2 月 23 日
I use windows 7. How can i understand which compiler i have?

サインインしてコメントする。

採用された回答

Matt Tearle
Matt Tearle 2011 年 2 月 23 日
  1. Make sure you have MATLAB Compiler and a supported C compiler
  2. Run the command mbuild -setup to select your C compiler
  3. Enter deploytool to open the deployment tool window; create a new project at the prompt
  4. Under the "build" tab, click the links "add main file" and "add files/directory" and add your MATLAB GUI code files (and data files, if necessary)
  5. Click the "build" button.
  2 件のコメント
Yucel
Yucel 2011 年 2 月 23 日
Thank you Matt...
S. Gopal
S. Gopal 2015 年 7 月 23 日
But Matt when I tried this there is the error like this what's the problem ? Please help... >> mbuild -setup
Welcome to mbuild -setup. This utility will help you set up a default compiler. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win32.html
Please choose your compiler for building shared libraries or COM components:
Would you like mbuild to locate installed compilers [y]/n? y
No supported SDK or compiler was found on this computer. For a list of supported compilers, see http://www.mathworks.com/support/compilers/R2013a/win32.html
Error using mbuild (line 189) Unable to complete successfully.

サインインしてコメントする。

その他の回答 (2 件)

UTHM
UTHM 2011 年 9 月 29 日
編集済み: Walter Roberson 2016 年 12 月 15 日
Hi.
I am new in matlab. I have window XP and and 2009 Matlab I have tried the command mbuild and I got 2 options:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~1\MATLAB\R2009b\sys\lcc
[0] None
Compiler:
I choose 1 and then I got error.
Trying to update options file: C:\Documents and Settings\user\Application Data\MathWorks\MATLAB\R2009b\compopts.bat
From template: C:\PROGRA~1\MATLAB\R2009b\bin\win32\mbuildopts\lcccompp.bat
Done . . .
Usage:
MBUILD [option1 ... optionN] sourcefile1 [... sourcefileN]
[objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]
[exportfile1 ... exportfileN]
Use the -help option for more information, or consult the MATLAB Compiler
User's Guide.
C:\PROGRA~1\MATLAB\R2009B\BIN\MEX.PL: Error: No file names given.
??? Error using ==> mbuild at 191 Unable to complete successfully.
Could you tell me what should I do?
Thanks.
  5 件のコメント
UTHM
UTHM 2011 年 9 月 29 日
thank you very much.
It is building, but does it take long time?
more than 10 minutes has passed...
Praveen Hashantha
Praveen Hashantha 2016 年 12 月 15 日
編集済み: Praveen Hashantha 2016 年 12 月 15 日
remove unnecessary tool boxes from the settings in the deploytool. your code probably uses unnecessary toolboxes. go to settings->Toolboxes on Path, and uncheck the stuff you don't need. Building process will be faster afterwards

サインインしてコメントする。


talel kchih
talel kchih 2018 年 3 月 14 日
編集済み: per isakson 2018 年 3 月 15 日
I have a MATLAB code on the script and I have turned into a guide, I have some problem ?? is it possible to help me ??
clear all;
close all
clc
grayImage = imread('img1.jpg');
[rows columns numberOfColorBands] = size(grayImage);
if numberOfColorBands > 1
grayImage = rgb2gray(grayImage);
end
I3=double(grayImage)/255;
subplot(3, 3, 1);
imshow(grayImage, []);
title('Original Grayscale Image');
set(gcf, 'Position', get(0,'Screensize'));
set(gcf,'name','Demo by ImageAnalyst','numbertitle','off')
[pixelCount grayLevels] = imhist(grayImage);
subplot(3, 3, 2);
bar(pixelCount);
title('Histogram of original image');
xlim([0 grayLevels(end)]);
binaryImage = grayImage < 150;
subplot(3, 3, 3);
imshow(binaryImage, []);
title('Binary Image');
binaryImage = imclearborder(binaryImage);
subplot(3, 3, 4);
imshow(binaryImage, []);
title('Border cleared');
I2=~binaryImage;
se=strel('disk',3);
I2=imerode(I2,se);
subplot(3,3,5),imshow(I2);
%bw = im2bw(grayImage); % conversion dans une image binaire - fonction im2bw
II = im2double(I2);
Label = bwlabel(II);
E = regionprops(Label,'Area');
[pasbesoin,idx] = sort([E.Area],'descend');
Lbw= Label==idx(2);
figure,imshow(Lbw)
imgf=Lbw.*I3;
figure,imshow(imgf);i;

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by