I have 2 ip tested, but have no response
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
I have test loopback address "127.0.0.1"
>> echoudp('on',4012)
u = udp('127.0.0.1',4012);
fopen(u);
fwrite(u,65:74);
A = fread(u,10)
A =
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
>> 
This is good!
I have 2 IP,   first(192.168.1.6),   second(192.168.1.30)  ◀ This is USB 2 RJ45
So, I have on 2 matlab window,  test following
i)
echoudp('on',4012)
u = udp('192.168.1.30',4012);
fopen(u);
A = fread(u,10)
ii)
echoudp('on',4013)
u = udp('192.168.1.6',4013);
fopen(u);
fwrite(u,1:10);
But, fread have no data!
A=[ ]
absolutely fwrite first, and then fread!
댓글 수: 0
답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!