Matlab/octave sample stream

hi everybody,
I’d like to know how I can convert a GNURadio .dat sample stream into a
format which I can handle through matlab or octave.

Also I’d really like to be able to set explicitly the number of bits
used to represent samples, from within a Python script, in order to
afford higher sampling frequencies over the USB2 Bus.
Is this possible?

Thanks to all of you for the extremely precious help I’ve always been
receiving.

vincenzo

On Fri, 2006-08-04 at 10:59 +0200, Vincenzo P. wrote:

hi everybody,

Hi, Vincenzo

I’d like to know how I can convert a GNURadio .dat sample stream into a
format which I can handle through matlab or octave.

Look in gnuradio-core/src/utils. There are m-files for reading the .dat
files.

Also I’d really like to be able to set explicitly the number of bits
used to represent samples, from within a Python script, in order to
afford higher sampling frequencies over the USB2 Bus.
Is this possible?

You can choose between 8-bit samples or 16-bit samples for I and Q. In
other words 16 bits or 32 bits per complex sample. See the “-8” option
in gnuradio-examples/python/usrp/usrp_fft.py. Note, however, that
rounding hasn’t been implemented for 8-bit like it has for 16-bit. Also,
as I understand it, 8-bit is formed by dropping the least significant 8
bits of a 16-bit sample. So, you could miss your signal if it isn’t
strong enough.

-Lee

On Fri, Aug 04, 2006 at 10:59:46AM +0200, Vincenzo P. wrote:

hi everybody,
I’d like to know how I can convert a GNURadio .dat sample stream into a
format which I can handle through matlab or octave.

There is no standard .dat format. You’ll have to figure out what the
particular application is looking for.

There is code that will load files of binary floats or complexes into
matlab/octave in gnuradio-core/src/utils:

read_char_binary.m
read_complex_binary.m
read_float_binary.m
read_int_binary.m
read_short_binary.m

Also I’d really like to be able to set explicitly the number of bits
used to represent samples, from within a Python script, in order to
afford higher sampling frequencies over the USB2 Bus.
Is this possible?

On receive you’ve got your choice of 16 or 8.
Transmit is currently always 16.

For an example, see gnuradio-examples/python/usrp/usrp_fft.py and look
for references to “options.width_8”

Thanks to all of you for the extremely precious help I’ve always been
receiving.

You’re welcome.

Eric

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs