How to insert a matlab file into GNURadio in python

Hello,

I’ve made a code in matlab for GNURadio but I don’t know how to insert
this code in the files programmed in python in GNURadio. Can anyone tell
me how to do it?I’ve seen there are some files done in matlab but I
couldn’t figure out how they have been inserted.

Thank you very much!

On Wed, Mar 19, 2008 at 06:50:22PM +0100, Jose Emilio Gervilla R.
wrote:

Hello,

I’ve made a code in matlab for GNURadio but I don’t know how to
insert this code in the files programmed in python in GNURadio. Can
anyone tell me how to do it?I’ve seen there are some files done in
matlab but I couldn’t figure out how they have been inserted.

GNU Radio doesn’t run Matlab or Octave code. The code in the tree is
typically used for displaying the output of log files.

Eric

Jose Emilio Gervilla R. wrote:

Hello,

I’ve made a code in matlab for GNURadio but I don’t know how to insert
this code in the files programmed in python in GNURadio. Can anyone tell
me how to do it?I’ve seen there are some files done in matlab but I
couldn’t figure out how they have been inserted.

Thank you very much!

Hi,

The octave scripts, found in here:
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/utils

… are not actually inserted into a GNU Radio flowgraph or anything.
They are simply used to post-process data from GNU Radio.

I think some people have managed to integrate GNU Radio and matlab in
the past, I don’t know how though. But, those files I think you’re
speaking of are for post-processing.

  • George

Jose Emilio Gervilla R. wrote:

Thank you!
We made that m-file in the OFDM directory to prototype and debug the GNU
Radio synchronizer. It is not used in GNU Radio, but we put it into the
source in case we (a) needed it again or (b) someone else could make use
of it.

Tom

What I was talking about I think it is not post-processing like the
files in the link youve put me in your answer. I refer for example at the synchronization matlab file which is implemented in the folder gnuradio/gnuradio-examples/python/ofdm. In this folder from the installed program is a file in matlab of synchronization and I think it is inserted by the makefile. Because of your answers I'm starting to think it is not inserted directly and the synchronization is being used by importing the blocks from blksimpl... and I think I should rewrite my code in python in order to insert it in GNURadio, isnt it?

Thank you!> Date: Wed, 19 Mar 2008 14:04:02 -0400> From:
[email protected]> To: [email protected]> CC: [email protected]>
Subject: Re: [Discuss-gnuradio] How to insert a matlab file into
GNURadio in python> > > > Jose Emilio Gervilla R. wrote:> > Hello,> >

I’ve made a code in matlab for GNURadio but I don’t know how to
insert > > this code in the files programmed in python in GNURadio. Can
anyone tell > > me how to do it?I’ve seen there are some files done in
matlab but I > > couldn’t figure out how they have been inserted.> > > >
Thank you very much!> > > > Hi,> > The octave scripts, found in here:>
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/utils>
… are not actually inserted into a GNU Radio flowgraph or anything.
They are simply used to post-process data from GNU Radio.> > I think
some people have managed to integrate GNU Radio and matlab in > the
past, I don’t know how though. But, those files I think you’re >
speaking of are for post-processing.> > - George

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…

http://alumni.media.mit.edu/~jcooley/gr_experiments/experiments/gr_socket.ht
m

On the MATLAB side, I used this code…

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=345

The MATLAB code would look something like…

Data =
con=pnet(‘tcpconnect’,‘127.0.0.1’,8881)
pnet(con,‘write’, data, ‘NATIVE’);
pnet(con,‘close’);

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…

Kevin

hi kevin
i m trying to link matlab with gnu radio i also fallow your stip but i
have face a problum "the link which you give is not open it gives ‘404
not found’
"
and can you help me that how to open blok of matlab in gnu radio
i m working on fyp of bet

thanx to read and i apologies if you could not understand my language or
spelling