File: pspect.man

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (64 lines) | stat: -rw-r--r-- 1,619 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.TH pspect 1 "April 1993" "Scilab Group" "Scilab Function"
.so ../sci.an
.SH NAME
pspect - cross-spectral estimate between 2 series
.SH CALLING SEQUENCE
.nf
[sm,cwp]=pspect(sec_step,sec_leng,wtype,x,y,wpar)
.fi
.SH PARAMETERS
.TP
x
: data if vector, amount of input data if scalar
.TP
y
: data if vector, amount of input data if scalar
.TP
sec_step
: offset of each data window
.TP
sec_leng
: length of each data window
.TP
wtype
: window type \fV(re,tr,hm,hn,kr,ch)\fR
.TP
wpar
: optional parameters
 for \fVwtype='kr', wpar>0\fR
 for \fVwtype='ch', 0<wpar(1)<.5, wpar(2)>0\fR
.TP
sm
: power spectral estimate in the interval \fV[0,1]\fR
.TP
cwp
: unspecified Chebyshev window parameter
.SH DESCRIPTION
Cross-spectral estimate between \fVx\fR and \fVy\fR if both are given
and auto-spectral estimate of \fVx\fR otherwise.
Spectral estimate obtained using the modified periodogram method.
.SH EXAMPLE
.nf
rand('normal');rand('seed',0);
x=rand(1:1024-33+1);
//make low-pass filter with eqfir
nf=33;bedge=[0 .1;.125 .5];des=[1 0];wate=[1 1];
h=eqfir(nf,bedge,des,wate);
//filter white data to obtain colored data 
h1=[h 0*ones(1:maxi(size(x))-1)];
x1=[x 0*ones(1:maxi(size(h))-1)];
hf=fft(h1,-1);   xf=fft(x1,-1);yf=hf.*xf;y=real(fft(yf,1));
//plot magnitude of filter
//h2=[h 0*ones(1:968)];hf2=fft(h2,-1);hf2=real(hf2.*conj(hf2));
//hsize=maxi(size(hf2));fr=(1:hsize)/hsize;plot(fr,log(hf2));
//pspect example
sm=pspect(100,200,'tr',y);smsize=maxi(size(sm));fr=(1:smsize)/smsize;
plot(fr,log(sm));
rand('unif');
.fi
.SH SEE ALSO
cspect
.SH AUTHOR
C. B.
.SH REFERENCE
 Digital Signal Processing by Oppenheim and Schafer