From: U?ur on 22 Jul 2010 08:46 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
|
Pages: 1 Prev: OPTIMIZED CODE FOR ARRAY OPERATION Next: UDP Communication |