myudp=udp('192.168.1.4','RemotePort',8888,'LocalPort',7777); %与IP为192.168.1.4的远程主机(其实是我自己的IP)建立udp,远程主机端口为8888,本地主机端口为7777。 fopen(myudp); fscanf(myudp) fclose(myudp); delete(myudp); clear myudp; disp('exit');
myudp=udp('192.168.1.4','RemotePort',8888,'LocalPort',7777); %与IP为192.168.1.4的远程主机(其实是我自己的IP)建立udp,远程主机端口为8888,本地主机端口为7777。 fopen(myudp); fscanf(myudp) fclose(myudp); delete(myudp); clear myudp; disp('exit');