help-octave
[Top][All Lists]
Advanced

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

Re: Error in `xcorr` (Signal package) "out of memory or dimension too la


From: Pantxo
Subject: Re: Error in `xcorr` (Signal package) "out of memory or dimension too large for Octave's index type"
Date: Thu, 8 Mar 2018 02:04:19 -0700 (MST)

Fabcap77 wrote
> I need to calculate the autocorrelation coefficients for a vector of 744
> elements, but `xcorr` fails returning this error message:
> 
>    error: out of memory or dimension too large for Octave's index type
>    error: called from:
>    error:   /home/$user/octave/signal-1.3.2/xcorr.m at line 203, column 7
> 
> The behaviour can be reproduced with:
> 
>    var = stdnormal_rnd(744);
>    [r, lg] = xcorr(var, length(var)/2-1);
> 
> Can nybody help to fix this problem?
> 
> 
> 
> --
> Sent from:
> http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
> 
> 
> -----------------------------------------
> Join us March 12-15 at CERN near Geneva
> Switzerland for OctConf 2018.  More info:
> https://wiki.octave.org/OctConf_2018
> -----------------------------------------

Hi,

You say you need the autocorrelation coefficients of a vector  of 744
elements but you are feeding xcorr with a matrix of 744x744 elements. Is
this intensional? 

If you really want a vector something like "var = stdnormal_rnd (1, 744)"
would probably do. What you currently do is asking for the intercorrelation
between the autocorrelation vectors of each column of your matrix (see "help
xcorr): 744 (autocorrelation vectors) vecotrs, intercorrelated with each
other -> 744*744*371 = 205361856 elements for the returned matrix.

If that is really what you want then you can do it in a loop but it will be
slow.

Pantxo






--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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