help-octave
[Top][All Lists]
Advanced

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

Re: error in xcorr2


From: Sergei Steshenko
Subject: Re: error in xcorr2
Date: Thu, 7 Jun 2012 10:27:24 -0700 (PDT)





>________________________________
> From: Jorge Alliende <address@hidden>
>To: address@hidden 
>Sent: Thursday, June 7, 2012 8:02 PM
>Subject: error in xcorr2
> 
>
>Hi there, 
>
>Sorry for the noise, but I want to user xcorr2 and I get an error. I am using
>
>GNU Octave, version 3.6.1
>
>Octave was configured for "i686-pc-mingw32".
>
>running on windows 7
>
>has this warnings at the start
>warning: gmsh does not seem to be present some functionalities will be disabled
>warning: dx does not seem to be present some functionalities will be disabled
>warning: function 
>C:\Octave2\Octave3.6.1_gcc4.6.2\Octave3.6.1_gcc4.6.2\share\octave\packages\statistics-1.1.0\fstat.m
> shadows a core library function
>
>to try xcorr2 I made 
>
>x=rand(8,8)
>y=rand(8,8)
>z=rand(4,4)
>
>[r,lags]=xcorr(x,y,'coeff')
>[r,lags]=xcorr(x,z,'coeff')
>
>and I get 
>error: element number 2 undefined in return list.
>
>II would appreciate any help. May be its a bug and I should send this to 
>another place,
>Thanks in advance
>Jorge
>
>
>_______________________________________________
>Help-octave mailing list
>address@hidden
>https://mailman.cae.wisc.edu/listinfo/help-octave
>
>

In octave-3.6.2 under Linux I'm getting a different error message:

"

octave:1> x=rand(8,8)
x =

   0.5946389   0.8976721   0.9897725   0.0913065   0.7810138   0.2051448   
0.1315098   0.9023616
   0.1029053   0.7209813   0.1049785   0.6902613   0.9536770   0.8586544   
0.1938626   0.6781253
   0.3589598   0.1604646   0.6902701   0.8246571   0.3605554   0.3708284   
0.0599368   0.5428541
   0.7255564   0.6535922   0.0051163   0.2735907   0.6580479   0.4063670   
0.7960504   0.3475387
   0.5338705   0.3219476   0.6143007   0.5057681   0.0929593   0.8555969   
0.0890207   0.0938681
   0.6278713   0.3740057   0.6164310   0.1104268   0.0258794   0.8649587   
0.9813633   0.8913390
   0.3037746   0.2967605   0.1396875   0.3551452   0.1726585   0.9634629   
0.3417240   0.4823005
   0.0211543   0.0849330   0.5167097   0.6546799   0.0118642   0.7103116   
0.7269563   0.6687220

octave:2> y=rand(8,8)
y =

   0.6901323   0.6763363   0.4244618   0.5428410   0.6827112   0.5619168   
0.2701278   0.8139849
   0.2853485   0.6144117   0.6713997   0.9998871   0.3758141   0.9664783   
0.9051950   0.5260871
   0.2143847   0.0724585   0.0934442   0.6226999   0.5353240   0.4117174   
0.7013791   0.8255767
   0.8136829   0.4441354   0.2233119   0.5128543   0.6528107   0.0798708   
0.7468951   0.1111076
   0.9215461   0.0700059   0.4923411   0.1418506   0.0722139   0.9005612   
0.2229015   0.0072115
   0.8119667   0.8351985   0.5092288   0.9863756   0.1046875   0.3234261   
0.8331900   0.1197056
   0.1864081   0.0632521   0.9795839   0.1769855   0.6830921   0.4798718   
0.6686808   0.3115778
   0.3828543   0.7762799   0.8328628   0.3859099   0.7213846   0.8812738   
0.5088440   0.6766540

octave:3> z=rand(4,4)
z =

   0.409656   0.035142   0.417725   0.887569
   0.955721   0.989285   0.271044   0.257730
   0.825995   0.269142   0.244993   0.818926
   0.020122   0.374163   0.252520   0.478919

octave:4>
octave:4> [r,lags]=xcorr(x,y,'coeff')
error: xcorr: Y must be a vector
error: called from:
error:   
/mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.2/share/octave/packages/signal-1.1.3/xcorr.m
 at line 127, column 5
octave:4> [r,lags]=xcorr(x,z,'coeff')
error: xcorr: Y must be a vector
error: called from:
error:   
/mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.2/share/octave/packages/signal-1.1.3/xcorr.m
 at line 127, column 5
octave:4>       

"

,

"
 octave:4> help xcorr
`xcorr' is a function from the file 
/mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.2/share/octave/packages/signal-1.1.3/xcorr.m

 usage: [R, lag] = xcorr (X [, Y] [, maxlag] [, scale])

 Estimate the cross correlation R_xy(k) of vector arguments X and Y
 or, if Y is omitted, estimate autocorrelation R_xx(k) of vector X,
 for a range of lags k specified by  argument "maxlag".  If X is a
 matrix, each column of X is correlated with itself and every other
 column.
...
",

so the error message makes sense - doesn't it ?

Regards,
  Sergei.


reply via email to

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