discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] Matlab interface to USRP


From: Moeller
Subject: Re: [Discuss-gnuradio] Matlab interface to USRP
Date: Wed, 04 Aug 2010 20:30:20 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1

 On 04.08.2010 19:35, Eric Blossom wrote:
>> Why making a difference? Most code is compatible between Octave and Matlab.
>> Even Matlab C++ MEX functions compile very well in Octave.
>> The Octave scripts in gnuradio are not working in Matlab, because they use
>> Octave-specials (comments as ## instead of %%, endfor instead of end).
>> I'm used to code in a style that both Matlab and Octave understand.
> Please send a patch to fix the comments.

I didn't change those manually, instead I wrote a bash script for this task,
see attachment. It can patch all octave-scripts at once.
But this is not perfect. In octave both ! and ~ allowed for negating,
in matlab just ~. This is not handled. I made no tests, since I
use my own signal processing and analysis toolbox.
There is a better converter:
http://octave.sourceforge.net/oct2mat/
but this also replaces functions calls, which may result in
octave-incompatible code.

It always has to be tested for compatibility. There are some
differences between Octave and Matlab, concerning
available commands and so called 'object oriented' functions.
Sometimes it works without modifications, sometimes not.
At least for my code, I try do avoid proprietary specials.

It's an ideological question (promoting Octave over Matlab),
whether we want the Octave-only style  (which looks better indeed),
or a Matlab-compatible style.I don't want to judge about this,
since I didn't contribute to the gnuradio code (yet).

Moeller


Attachment: octavescript2matlabscript
Description: Text document


reply via email to

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