discuss-gnuradio
[Top][All Lists]
Advanced

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

[Discuss-gnuradio] GNU Radio TCP and MATLAB


From: Kevin Rudd \(Contractor\)
Subject: [Discuss-gnuradio] GNU Radio TCP and MATLAB
Date: Thu, 26 Apr 2007 12:52:40 -0400

Hello again,
  I have decided to try the GNURadio -> TCP -> MATLAB route.  I am running
into a few problems.

First, I downloaded Jamie Cooley's GNURadio TCP Socket code here... 

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

Then I downloaded a free matlab TCP toolbox as David suggested.

http://www.mathworks.nl/matlabcentral/fileexchange/loadFile.do?objectId=345&;
objectType=file

I can set up the connection and send data to matlab, but the data I receive
is all messed up. I think the format is off.  For those who have done this,
what data type are you sending and how are you receiving it?  Currently, I
am just sending a complex sine wave.  If I sink it to a file, I can open it
in matlab with no problem.  But when I send it via TCP, I get garbage.

My matlab commands are basically...

Con   = pnet(sock,'tcplisten');
data  = pnet(con, 'read', 1000, 'SINGLE');
cdata = data(1:2:end)+j*data(2:2:end);
plot(log(abs(fft(cdata))))

Is 'SINGLE' the correct type to use? (I tried all the others and I still get
gargabe).

Thanks for the help,
Kevin







reply via email to

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