[Top][All Lists]

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

[Discuss-gnuradio] RE: How to insert a matlab file into GNURadio in pyth

From: Kevin Rudd
Subject: [Discuss-gnuradio] RE: How to insert a matlab file into GNURadio in python
Date: Thu, 20 Mar 2008 08:30:24 -0400

I used MATLAB to create waveforms and then send them to GNURadio using TCP
ports and out through the USRP (and vise versa).  Not sure if this is what
you want, but this is how I did it...

On the python side, I used the following code to open the TCP socket...


On the MATLAB side, I used this code...


The MATLAB code would look something like...

Data = <create a waveform>
pnet(con,'write', data, 'NATIVE');

The python code would look something like...

## imports...
from gr_socket import *

# the main flow would be as follows.
u = usrp.sink_c ()       
(src, fd, conn) = make_socket_source(8881, 4)
fmtx = blks.nbfm_tx (fg, audio_rate, usrp_rate, max_dev=2.5e3, tau=75e-6)
gain = gr.multiply_const_cc (40.0)
fg.connect (src, fmtx, gain, u)

You can receive data in GNURadio and send it directly to MATLAB just as
easy.  Hope this helps...


reply via email to

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