0

I am trying to read a binary file generated by LABVIEW (1000 sample sine wave, freq 0.01 and amplitude of 6000) with MATLAB

I am using this simple code:

fid = fopen('BinaryFile.bin');
m5 = fread(fid);
fclose(fid);

MATLAB shows me a 8000x1 vector!! I don't understand why, any help would be appreciated.

I cannot find any way to attach the binary file!!

1
  • What is the size of the file in Kb? what was the datatype in LabVIEW before saving it (double)? Commented Mar 13, 2014 at 6:30

1 Answer 1

2

Have you tried to define the 'precision' argument in fread?

m5 = fread( fid, [], 'double' );
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Shai for the answer. My new problem is I don

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.