[Hackrf-dev] Parse recorded samples to Matlab

William Hill mail at wbh.org
Mon Apr 27 18:08:27 EDT 2015


On 27 Apr 2015, at 22:54, Carl Olsson <carlolsson.co at gmail.com> wrote:

> Hi all,
> 
> This is my first post to the mailing list so I hope I do everything correctly.
> I have recorded data using
> hackrf_transfer -r "nameOfFile" -f 149000000 -s 5000000 -n 50000000
> And I now want to read the data into Matlab but I can't figure out how. I have read that the format is 8 bit signed I part followed by 8 bit signed Q part and so on. I looked at the octave function in gr-utils and tried to change the parsing from float so schar which should be 8 bit signed but it didn't work.
> 
> Could someone please give me a hint on how to proceed?

Hi, this is how I read a file I’d recorded:

>> f=fopen(‘data.iq’);
>> iq=fread(f,'int8’);
>> fclose(f)
>> i=iq(1:2:end);
>> q=iq(2:2:end);

Bill

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20150427/f7e1716e/attachment.pgp>


More information about the HackRF-dev mailing list