NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

root/gliderproc/trunk/MATLAB/opnml/basics/ap_to_ri_deg.m

Revision 495 (checked in by cbc, 11 years ago)

Initial import of Stark code.

Line 
1 % AP_TO_RI_DEG   Convert amplitude/phase(deg) vectors to real/imaginary.
2 %
3 %                AP_TO_RI_DEG(a,p) returns the real and imaginary
4 %                components in a two-column matrix as [real,imag].
5 %
6 %                Call as: [R,I]=ap_to_ri_deg(amp,pha);
7 %
8 function [R,I]=ap_to_ri_deg(a,p)
9
10 deg_to_rad = pi/180.;
11
12 c=a.*exp(-i.*p*deg_to_rad);
13 R=real(c);
14 I=imag(c);
15
16 return
17
18
19  
20
Note: See TracBrowser for help on using the browser.