MATLAB: TCP/IP connection problem

tcpip

Hello all and thanks for your help,
I was trying to make an easy tcpip connection between my pc and a little board connected to my computer via USB. This one has an IP address (192.168.1.100) and a port address 21845. the simple code on matlab used is:
conn=tcpip('192.168.1.100',21845);
conn
fopen(conn);
fclose(conn);
But when I check the connection status:
TCPIP Object : TCPIP-192.168.1.100
Communication Settings
RemotePort: 21845
RemoteHost: 192.168.1.100
Terminator: 'LF'
Communication State
Status: closed
RecordStatus: off
Read/Write State
TransferStatus: idle
BytesAvailable: 0
ValuesReceived: 0
ValuesSent: 0
What it should appear in the status field is open, Iam rigth? Thanks for your help.

Best Answer

No need to answer to this question. Everything works fine now. Anyway the correct sequence is
conn=tcpip('192.168.1.100',21845);
conn %close status
fopen(conn);
conn %open status
fclose(conn);