On Wed, Oct 21, 2009 at 6:49 AM, Pierre Lonchampt
<[email protected]> wrote:
> Hi
>
> I am currently trying to port an algorithm written for Matlab into Octave.
> On top of the usual and already documented discrepancies, I stumbled against
> the following one which took me a while to identify:
>
> When calling
>
> function [R, lags] = xcorr (X, Y, maxlag, scale)
>
> In octave, having maxlag longer than X returns an error message.
> In Matlab, that is perfectly OK and zeros are padded around of the
> correlation "center" when that is the case (and which is true
> mathematically-wise).
>
> I quickly tweaked the octave script in a ugly way to work "FOR MY
> APPLICATION ONLY". I attach it nevertheless as it may illustrate my point
> better than my words above. The tweak is between the comments starting with
> %PL.
>
> I am not sure whether you guys will consider this discrepancy to be a bug in
> either side, but in all cases it could be documented better somewhere.
>
> Regards and congrats for the great tool octave is!
>
> PS: this is true in both versions 3.0.1 and 3.2.3 compared with both matlab
> R11 and R12 (I don't know about more recent releases, nevertheless Mathworks
> documentation does not refer to Maxlag needing to be shorter than the input
> vetcor(s)...
>
> Hope it helps
>

There is no xcorr function in Octave (signal is an external package)
-> you're on the wrong list. I'm forwarding this to OctaveForge.

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev

Reply via email to