MatLab函数:pol2cart()

函数功能

把极坐标或圆柱坐标转换为直角坐标(笛卡儿坐标)

使用方法

[X,Y] = POL2CART(TH,R)将极坐标(角度TH和半径R)存储的数据中相应的元素转换到笛卡儿坐标X,Y。数组TH和R必须大小相同(或者二者皆可标量),TH必须是弧度值。 matlab

[X,Y,Z] = POL2CART(TH,R,Z)将圆柱坐标(角度TH、半径R和高度Z)存储的数据中相应的元素转换到笛卡儿坐标X,Y,Z。数组TH、R和Z必须大小相同(或者其中任何一个皆可标量),TH必须是弧度值。

matlab

输入TH,R,Z支持的类型:
float:double, single

pol2cart 

Transform polar or cylindrical coordinates to Cartesian

Syntax

  • [X,Y] = pol2cart(THETA,RHO)
    [X,Y,Z] = pol2cart(THETA,RHO,Z)
    

Description

[X,Y] = pol2cart(THETA,RHO) transforms the polar coordinate data stored in corresponding elements of THETA and RHO to two-dimensional Cartesian, or xy, coordinates. The arrays THETA and RHO must be the same size (or either can be scalar). The values in THETA must be in radians.

[X,Y,Z] = pol2cart(THETA,RHO,Z) transforms the cylindrical coordinate data stored in corresponding elements of THETARHO, and to three-dimensional Cartesian, or xyz, coordinates. The arrays THETA , RHO, and Z must be the same size (or any can be scalar). The values in THETA must be in radians.

Algorithm

The mapping from polar and cylindrical coordinates to Cartesian coordinates is:


你可能感兴趣的:(matlab笔记)