~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to man/signal/mrfit.man

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH mrfit 1 "April 1993" "Scilab Group" "Scilab Function"
 
2
.so ../sci.an
 
3
.SH NAME
 
4
mrfit - frequency response fit
 
5
.SH CALLING SEQUENCE
 
6
.nf
 
7
sys=mrfit(w,mag,order)
 
8
[num,den]=mrfit(w,mag,order)
 
9
sys=mrfit(w,mag,order,weight)
 
10
[num,den]=mrfit(w,mag,order,weight)
 
11
.fi
 
12
.SH PARAMETERS
 
13
.TP 10
 
14
w
 
15
: positive real vector of frequencies (Hz)
 
16
.TP
 
17
mag
 
18
: real vector of frequency responses magnitude (same size as \fVw\fR)
 
19
.TP
 
20
order
 
21
: integer (required order, degree of \fVden\fR)
 
22
.TP
 
23
weight
 
24
: positive real vector (default value \fVones(w)\fR).
 
25
.TP
 
26
num,den
 
27
: stable polynomials
 
28
.SH DESCRIPTION
 
29
\fVsys=mrfit(w,mag,order,weight)\fR returns a bi-stable transfer function
 
30
\fVG(s)=sys=num/den\fR, of of given \fVorder\fR such that 
 
31
its frequency response magnitude \fVabs(G(w(i)))\fR 
 
32
matches \fVmag(i)\fR i.e. \fVabs(freq(num,den,%i*w))\fR should be 
 
33
close to \fVmag\fR.
 
34
\fVweight(i)\fR is the weigth given to \fVw(i)\fR.
 
35
.SH EXAMPLE
 
36
.nf
 
37
w=0.01:0.01:2;s=poly(0,'s');
 
38
G=syslin('c',2*(s^2+0.1*s+2),(s^2+s+1)*(s^2+0.3*s+1)); // syslin('c',Num,Den);
 
39
fresp=repfreq(G,w);
 
40
mag=abs(fresp);
 
41
Gid=mrfit(w,mag,4);
 
42
frespfit=repfreq(Gid,w);
 
43
plot2d([w',w'],[mag(:),abs(frespfit(:))])
 
44
.fi
 
45
.SH SEE ALSO
 
46
cepstrum, frfit, freq, calfrq
 
47
 
 
48
 
 
49