root/gliderproc/trunk/MATLAB/opnml/basics/ap_to_ri_rad.m
Revision 495 (checked in by cbc, 12 years ago) |
---|
Line | |
---|---|
1 | % AP_TO_RI_RAD Convert amplitude/phase(rad) 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_rad(amp,pha); |
7 | % |
8 | function [R,I]=ap_to_ri_rad(a,p) |
9 | |
10 | c=a.*exp(-i.*p); |
11 | R=real(c); |
12 | I=imag(c); |
13 | |
14 | return |
15 | |
16 | |
17 | |
18 |
Note: See TracBrowser for help on using the browser.