Why doesn't serial object work in compiled application with MATLAB 2015a?

I compiled succesfully a standlone application with the MCR included, but when I install and run the application in other computer, the application throw an error: undefinedVarOrClass
This is the code:
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
try
com='COM6';
delete(instrfind({'Port'},{com}));
f=serial('COM6','BaudRate',9600);
fopen(f);
pause(2);
fprintf(f,'%s','F');
fclose(f);
catch ME
warndlg(ME.identifier);
end
Note: I used GUI of matlab.

답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

질문:

2017년 9월 27일

편집:

2017년 9월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by