.m file to .exe file by >mcc

i make a m file (v.m) which is :
>vid=videoinput('winvideo',1, 'YUY2_160x120');
>preview(vid); %for preview the video
i convert it to the v.exe file but it not working (a black screen,like DOS, appear for some time)
whae i do?
help me !
also
i am also succesfully convert a m file into exe file which work well the m file is
>import java.awt.Robot;
>mouse = Robot;
>mouse.mouseMove(0, 0);
?screensize = get(0, 'screensize');
>aspect_ratio = screensize(3)/screensize(4);
>for i = 1:screensize(4)
>mouse.mouseMove(aspect_ratio*i, i);
>pause(0.00001);
>end
i dont know what happen whith the upper one m file

댓글 수: 2

Kaustubha Govind
Kaustubha Govind 2012년 4월 4일
I would recommend running the executable from a System command window (instead of simply double-clicking on the icon) and see if any errors are returned at the command prompt. Also, are you running the compiled executable on the same machine where the corresponding MATLAB code worked fine? If it is a different machine, perhaps there is an issue with the camera drivers.
vaibhav mathur
vaibhav mathur 2012년 4월 7일
ok afterall,the command prompt show the error:
???error using ==> imaqdevice.preview at 179
PREVIEW(OBJ) is not permitted in deployed mod.
error in ==>v at 2
imaq:preview :no deployment
while v.m worked fine on same machine
{>vid=videoinput('winvideo',1, 'YUY2_160x120');
>preview(vid); %for preview the video
is not a big code so please make a m file on your machine and make a corresponding exe file and share what happen?
please help }

댓글을 달려면 로그인하십시오.

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2012년 4월 9일

1 개 추천

As the error points out, the PREVIEW function is not support for deployment. You cannot generate an executable from MATLAB code that uses this function.

질문:

2012년 4월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by