~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/signal/cspect.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
cspect            Scilab Group            Scilab Function            cspect
2
 
NAME
3
 
   cspect - spectral estimation (correlation method)
4
 
  
5
 
CALLING SEQUENCE
6
 
 [sm,cwp]=cspect(nlags,ntp,wtype,x,y,wpar)
7
 
PARAMETERS
8
 
 x          : data if vector, amount of input data if scalar
9
 
            
10
 
 y          : data if vector, amount of input data if scalar
11
 
            
12
 
 nlags      : number of correlation lags (positive integer)
13
 
            
14
 
 ntp        : number of transform points (positive integer)
15
 
            
16
 
 wtype      : string : 're','tr','hm','hn','kr','ch' (window type)
17
 
            
18
 
 wpar       : optional window parameters for wtype='kr', wpar>0 and for
19
 
            wtype='ch', 0 < wpar(1) < .5, wpar(2) > 0
20
 
            
21
 
 sm         : power spectral estimate in the interval [0,1]
22
 
            
23
 
 cwp        : calculated value of unspecified Chebyshev window parameter
24
 
            
25
 
DESCRIPTION
26
 
   Spectral estimation using the  correlation method. Cross-spectral
27
 
  estimate of x and y is calculated when both x and y are given.
28
 
  Auto-spectral estimate of x is calculated if y is not given.
29
 
  
30
 
EXAMPLE
31
 
 rand('normal');rand('seed',0);
32
 
 x=rand(1:1024-33+1);
33
 
 //make low-pass filter with eqfir
34
 
 nf=33;bedge=[0 .1;.125 .5];des=[1 0];wate=[1 1];
35
 
 h=eqfir(nf,bedge,des,wate);
36
 
 //filter white data to obtain colored data 
37
 
 h1=[h 0*ones(1:maxi(size(x))-1)];
38
 
 x1=[x 0*ones(1:maxi(size(h))-1)];
39
 
 hf=fft(h1,-1);   xf=fft(x1,-1);yf=hf.*xf;y=real(fft(yf,1));
40
 
 sm=cspect(100,200,'tr',y);
41
 
 smsize=maxi(size(sm));fr=(1:smsize)/smsize;
42
 
 plot(fr,log(sm))
43
 
SEE ALSO
44
 
   pspect
45
 
  
46
 
AUTHOR
47
 
   C. Bunks 
48
 
  
49
 
REFERENCE
50
 
    Digital Signal Processing by Oppenheim and Schafer
51