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.

Respuestas (0)

Categorías

Más información sobre C Shared Library Integration en Centro de ayuda y File Exchange.

Preguntada:

el 27 de Sept. de 2017

Editada:

el 29 de Sept. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by