Re: reading network data



Ender <noreply@xxxxxxxxxxxx> writes:

On 2007-11-25 11:35:23 -0600, Ender <noreply@xxxxxxxxxxxx> said:

Why don't you post some code, of the program that generates the packets.

The program that generates this is from matlab

u = udp('10.7.10.2',4012);
fopen(u)
fwrite(u,arr,'uint16')

I don't know anything about Mathworks, but a quick look suggests that
that is a call to write (binary) integer data, not floating point.

I general, if you have control over both sides, you should choose the
encoding to be as universal as possible -- you never know what odd
hardware might end up running your code. I'd send the data as ASCII
characters, essentially printing and reading the numbers rather than
sing any binary format.

--
Ben.
.



Relevant Pages

  • Re: Double Posts ... (Reading Binary data re-up)
    ... Maybe I should note that if I read the binary file back into Matlab it returns a 25*1 column vector instead of a 5*5 matrix ... ... I need binary format, writing text from Matlab takes ages. ... allocate ) ...
    (comp.lang.fortran)
  • Re: Int 32 processing speed: Is it a bug
    ... You can now combine numbers of an integer data ... "Matlab does all arithmetic in double, ... the time required for reading variables and storing results, ... reading from/writing to memory dominates the execution time, ...
    (comp.soft-sys.matlab)
  • Re: Read Fortran .exe results
    ... fortran, just C or C++, and after a while ported everything to matlab. ... read some Fortran results which is binary format. ... the necessary details are easily available in the ...
    (comp.soft-sys.matlab)
  • convertion of numerical eigencoefficients to binary format
    ... eigen-coefficients to binary format for watermark purposes. ... MATLAB only ... allows integer conversion. ...
    (comp.soft-sys.matlab)
  • Re: Matlab and binary files - jasco .jws data importer
    ... The files appear to be in a binary format. ... fluorescencespectradatasets in the .jws format. ... know of to get them into MATLAB is to convert each one into ASCII ...
    (comp.soft-sys.matlab)