Mercurial > hg > ltpda
comparison m-toolbox/classes/@pz/ri2fq.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 % RI2FQ Convert comlpex pole/zero into frequency/Q pole/zero representation. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: RI2FQ Convert comlpex pole/zero into frequency/Q pole/zero | |
5 % representation. | |
6 % | |
7 % CALL: [f0, q]= ri2fq(c) | |
8 % | |
9 % VERSION: $Id: ri2fq.m,v 1.4 2011/02/18 16:48:54 ingo Exp $ | |
10 % | |
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
12 | |
13 function [f0, q]= ri2fq(c) | |
14 | |
15 if(nargin==0) | |
16 disp('usage: [f0, q]= ri2fq(c)'); | |
17 return | |
18 end | |
19 | |
20 a = real(c(1)); | |
21 b = imag(c(1)); | |
22 | |
23 f0 = sqrt(a^2 + b^2)/(2*pi); | |
24 q = 0.5*sqrt(1 + b^2/a^2); | |
25 | |
26 end |