discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Error to read dat/binary file in octave as well i


From: Ron Economos
Subject: Re: [Discuss-gnuradio] Error to read dat/binary file in octave as well in matlab from gnu radio
Date: Thu, 04 Dec 2014 22:27:24 -0800
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

I am not an Octave expert by any means, but I do have a solution for you.
It's pretty slow, but it does work.

filename1 = "samples.cfile";
fid1 = fopen (filename1, "r");

tmpreal = fread (fid1, "float32", 4);
fseek(fid1, 4, 'bof');
tmpimag = fread (fid1, "float32", 4);
DataIn = complex(tmpreal, tmpimag);

best regards,
Ron

On 12/04/2014 09:59 PM, alok ranjan wrote:
Hello All,


I am facing an error when i am trying to convert dat/bin(octet streams, binary application) into either octave or mat format.


The bin file is generated from uhd_rx_cfile 0r rx_samples_to_file, which i used for capturing the transmitted and received signals. Since the default extension is binary file so i want to read the I&Q data from that either in Matlab or Octave.


I am trying the following command in octave to convert but it throws an error ;

addpath("/home/username/gnuradio/gr-utils/")


data_oct = read_complex_binary("/home/username/datafile name")

After this second command it is throwing an error that read_complex_binary is not defined in line 1 column 12.

What i am doing wrong ? 

How can i extract the information from the bin file ? 


Any help is appreciated.


Alok Ranjan


_______________________________________________
Discuss-gnuradio mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio


reply via email to

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