[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: |
Fabcap77 |
Subject: |
Re: Error in `xcorr` (Signal package) "out of memory or dimension too large for Octave's index type" |
Date: |
Thu, 8 Mar 2018 03:01:00 -0700 (MST) |
Pantxo wrote
> 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?
>
> Uhm... I am migrating a script from Scilab, so it is possible that
> something was lost in translation.
>
> Anyway, I have a vector of 744 values (a time-series) and I want to
> calculate the autocorrelation coefficients for lag = 1 to N-1. That's what
> xcorr is for, right? Or are there better ways?
>
>
> 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
>
>
> -----------------------------------------
> Join us March 12-15 at CERN near Geneva
> Switzerland for OctConf 2018. More info:
> https://wiki.octave.org/OctConf_2018
> -----------------------------------------
--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
Re: Error in `xcorr` (Signal package) "out of memory or dimension too large for Octave's index type", Pantxo, 2018/03/08
Re: Error in `xcorr` (Signal package) "out of memory or dimension too large for Octave's index type", Fabcap77, 2018/03/09