comparison m-toolbox/classes/+utils/@math/phase.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 % PHASE return the phase in degrees for a given complex input.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: PHASE return the phase in degrees for a given complex
5 % input. Supposed to be analogous to angle but return degrees
6 % instead of radians.
7 %
8 % CALL: p = phase(resp)
9 %
10 % INPUTS: resp - complex number
11 %
12 % OUTPUTS: p - phase
13 %
14 % VERSION: $Id: phase.m,v 1.2 2008/09/25 11:10:35 ingo Exp $
15 %
16 % HISTORY: dd-mm-yyyy M Hewitson
17 % Creation
18 %
19 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
20
21 function p = phase(resp)
22
23 p = angle(resp)*180/pi;
24
25 end
26