mf1364
Full Member level 3
serial port in matlab
Hi every body
I run this codes in matlab :
s = serial('COM1');
fopen(s)
fwrite(1)
fclose(s)
but i received this error??? Error using ==> serial.fopen
Port: COM1 is not available. No ports are available.
Use INSTRFIND to determine if other instrument
objects are connected to the requested device).
according this error i used 'instrfind'and i understood that status of com1 is closed.
and now i want to open this port
do you know what should i have down?
Hi every body
I run this codes in matlab :
s = serial('COM1');
fopen(s)
fwrite(1)
fclose(s)
but i received this error??? Error using ==> serial.fopen
Port: COM1 is not available. No ports are available.
Use INSTRFIND to determine if other instrument
objects are connected to the requested device).
according this error i used 'instrfind'and i understood that status of com1 is closed.
and now i want to open this port
do you know what should i have down?