Mercurial > hg > ltpda
comparison m-toolbox/classes/+utils/@math/getdc.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % GETDC get the DC gain factor for a pole-zero model | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION | |
5 % | |
6 % A zpk model in matlab notation is an object of the type: | |
7 % | |
8 % (s-z1)...(s-zN) | |
9 % zpk = k*---------------- | |
10 % (s-p1)...(s-pn) | |
11 % | |
12 % the zero-frequency-gain (zfg) or DC gain of this object is obtained by | |
13 % the equation, for s = 0. | |
14 % LTPDA pzmodels are constructed by poles, zeros and DC gain. This means | |
15 % that the value stored in the 'gain' field of the model is the dc gain! | |
16 % This function calculate k. | |
17 % | |
18 % CALL: | |
19 % | |
20 % dc = getdc(z,p,k) | |
21 % | |
22 % INPUT: | |
23 % | |
24 % z: zeros | |
25 % p: poles | |
26 % k: gain coefficient | |
27 % | |
28 % | |
29 % OUTPUT: | |
30 % | |
31 % dc: dc gain of the model | |
32 % | |
33 % NOTE: | |
34 % | |
35 % | |
36 % | |
37 % | |
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
39 % VERSION: $Id: getdc.m,v 1.2 2010/02/22 15:14:17 luigi Exp $ | |
40 % | |
41 % HISTORY: 08-10-2008 L Ferraioli | |
42 % Creation | |
43 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
44 function dc = getdc(z,p,k) | |
45 | |
46 zrs = prod(-1*z); | |
47 pls = prod(-1*p); | |
48 | |
49 dc = k*zrs/pls; | |
50 | |
51 end | |
52 | |
53 | |
54 | |
55 | |
56 | |
57 | |
58 |