MatLab函数:pol2cart()
函數(shù)功能
把極坐標或圓柱坐標轉(zhuǎn)換為直角坐標(笛卡兒坐標)使用方法
[X,Y] = POL2CART(TH,R)將極坐標(角度TH和半徑R)存儲的數(shù)據(jù)中相應的元素轉(zhuǎn)換到笛卡兒坐標X,Y。數(shù)組TH和R必須大小相同(或者二者皆可標量),TH必須是弧度值。?matlab
[X,Y,Z] = POL2CART(TH,R,Z)將圓柱坐標(角度TH、半徑R和高度Z)存儲的數(shù)據(jù)中相應的元素轉(zhuǎn)換到笛卡兒坐標X,Y,Z。數(shù)組TH、R和Z必須大小相同(或者其中任何一個皆可標量),TH必須是弧度值。
matlab
輸入TH,R,Z支持的類型:
float:double, single
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?THETA,?RHO, and?Z?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函数:pol2cart()的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 引用类型强制转换
- 下一篇: Yansongda\Pay 支付宝返回值