Mercurial > hg > ltpda
comparison m-toolbox/classes/+utils/@math/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 complex pole/zero into frequency/Q pole/zero representation. | |
2 % | |
3 % [f0, q]= ri2fq(c) | |
4 % | |
5 % M Hewitson 26-01-07 | |
6 % | |
7 % $Id: ri2fq.m,v 1.3 2008/10/24 09:40:19 hewitson Exp $ | |
8 % | |
9 | |
10 function [f0, q]= ri2fq(c) | |
11 | |
12 if(nargin==0) | |
13 disp('usage: [f0, q]= ri2fq(c)'); | |
14 return | |
15 end | |
16 | |
17 a = real(c(1)); | |
18 b = imag(c(1)); | |
19 | |
20 f0 = sqrt(a^2 + b^2)/(2*pi); | |
21 q = 0.5*sqrt(1 + b^2/a^2); | |
22 | |
23 end | |
24 % END |