[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
[Discuss-gnuradio] RE: How to insert a matlab file into GNURadio in python
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...
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...
|[Prev in Thread]
||[Next in Thread]|
- [Discuss-gnuradio] RE: How to insert a matlab file into GNURadio in python,
Kevin Rudd <=