Kyle is correct.  And to be specific example (since I like them, step by step), 
I do essentially the same thing like:

>> InFileID = fopen('myfile.dat');
>> A = fread(InFileID,'float32');  % Read in per Kyle's description
>> fclose(InFileID);
>> B = [A(1:2:end), A(2:2:end)];  % Split out Re & Imag
>> plot(B)

Jeff

________________________________
From: USRP-users <usrp-users-boun...@lists.ettus.com> on behalf of Kyle A Logue 
via USRP-users <usrp-users@lists.ettus.com>
Sent: Monday, April 20, 2020 12:27 PM
To: usrp-users@lists.ettus.com <usrp-users@lists.ettus.com>; AKINYELE 
ITAMAKINDE <aitamaki...@abuad.edu.ng>
Subject: Re: [USRP-users] Conversion of .dat file to a readable data using GNU 
octave

Assuming you have your file sink configured to complex, the data (which you 
shouldn't just save as .dat - consider .fc32 or sigmf) should simply be 
interleaved float32. So it looks like

[(float32 real), (float32 imag), (float32 real), (float32 imag), ... ]

in python you can read that w/`np.fromfile(xyz, dtype=np.complex64)`. There 
must be an equivalent in octave.

Kyle Logue
Engineering Manager ⚝ Comm Software Implementation Dept
The Aerospace Corporation
________________________________
From: USRP-users <usrp-users-boun...@lists.ettus.com> on behalf of AKINYELE 
ITAMAKINDE via USRP-users <usrp-users@lists.ettus.com>
Sent: Wednesday, April 15, 2020 07:30
To: usrp-users@lists.ettus.com <usrp-users@lists.ettus.com>
Subject: [USRP-users] Conversion of .dat file to a readable data using GNU 
octave

I am working on channel sounding using USRP and GNU radio platforms. I am 
experiencing difficulty in converting the .dat file of sink file at receiver of 
flow graph into readable data using GNU octave. Can somebody help me to achieve 
this? Thanks
_______________________________________________
USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Reply via email to