home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / SPECFUN.DI$ / POL2CART.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  615 b   |  17 lines

  1. function [x,y,z] = pol2cart(th,r,z);
  2. %POL2CART Transform polar coordinates to Cartesian.
  3. %    [X,Y] = POL2CART(TH,R) transforms data stored in polar
  4. %    coordinates to Cartesian coordinates. If [M,N] = SIZE(TH), then
  5. %    R must be also be the same size. TH must be in radians.
  6. %       [X,Y,Z] = POL2CART(TH,R,Z) transforms data stored in cylindrical
  7. %       coordinates to Cartesian coordinates. If [M,N] = SIZE(TH), then
  8. %       R and Z must be the same size.
  9. %
  10. %    See also CART2SPH, CART2POL, SPH2CART.
  11.  
  12. %    L. Shure, 4-20-92.
  13. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  14.  
  15. x = r.*cos(th);
  16. y = r.*sin(th);
  17.