From: U?ur on
I am trying to send some data to UDP port in ascii format. The file that I read contains ascii characters which will be sent. Here is the some part of my code:
*****************************
fid = fopen('record_001586.txt', 'r');
F = fread(fid, 'uchar')';
Host = input('Remote Host IP: ','s');
Port = input('Remote Port: ');
echoudp('on',Port);
u = udp(Host,Port);
fopen(u);
fprintf(u, '%c', (F(1:10))); %F(1:10) = [161 160 65 0 0 0 64 65 66 67];
fscanf(u); % answer is [161 160 65]
echoudp('off')
fclose(u);
********************************
As seen from the answer, fscanf read data untill 0 (NULL).
But I also want to send zeros to UDP port in ascii format.

Any help will be appreciated.
Thanks in advance,
Uğur BOZKURT