Hello!
Thanks for advice. I still don't get it though... after running the m-file I
get a matrix y with 3 rows and n columns. How is the data arranged in that
matrix? It can't be channel(n) = row(n+1), because the data makes no sense
that way. I measured voltages around 1 V, and the matrix contains numbers in
the range -3E4...+4E4. How do the matrix elements correspond to the voltage
measured?
Best regards,
Antti Ryhänen
"Shan" wrote in message
news:506500000005000000F8BB0000-1031838699000@exchange.ni.com...
> The example will save the data as a binary file of I16 numbers.
>
> Try the following in Matlab to read it.
>
> [fname, pname]=uigetfile('c:\*.bin', 'Select file to open');
> filename=[pname fname];
> fid=fopen(filename,'r','b');
% Open
> the file for reading 'r' big endian 'b' values
> [y,count]=fread(fid,[3,inf],'int16'); % Read the contents of the
> file, a 3 x n array of 32 bit floats
> fclose(fid);
>
> The above reads 3 columns of data. It reads inf number of rows (reads
> to the end of the file).
>
> Tim