[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] How to use the read_float_binary.m function

From: Marcus D. Leech
Subject: Re: [Discuss-gnuradio] How to use the read_float_binary.m function
Date: Thu, 27 Oct 2011 21:36:59 -0400
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110928 Fedora/3.1.15-1.fc14 Thunderbird/3.1.15

Hello Marcus,

I really appreciate your help.
Those files (read_float_binary.m and read_complex_binary.m) are MATLAB
macros, intended to be used directly by MatLab.

Did you mean that, the binary file which will be created by the
gr_file_sink, is needed Matlab to open?
Ok, then I will take the file to another PC where Matlab is installed and
will try to open it.
However, I was looking for some way to directly convert the file into .txt
or any other readable format using the python program.
Ah, I got the impression you were looking for a quick way to read the files into MatLab.

They're native-binary floating-point data, either "float" or "complex float".

In Python there's a plethora of ways of handling that, but numpy would be the best bet, and I see that Josh
  has already recommended numpy.fromfile.

For significant storage-size and performance reasons, the "file sink" blocks in Gnu Radio store their data in the native floating-point format. Although for low-speed data, one might consider Josh' new python-blocks stuff, which could do conversions on-the-fly into a number of different formats, including printable ones.

Marcus Leech
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

reply via email to

[Prev in Thread] Current Thread [Next in Thread]