⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 polar2rect.m

📁 matlab programming for engineers(2nd)书籍源码,这是一本很好的学习MATLAB编程书
💻 M
字号:
function [x, y] = polar2rect(r,theta)
%POLAR2RECT Convert rectangular to polar coordinates 
% Function POLAR2RECT accepts the polar coordinates 
% (r,theta), where theta is expressed in degrees,
% and converts them into the rectangular coordinates
% (x,y).
%
% Calling sequence:
%   [x, y] = polar2rect(r,theta)

% Define variables:
%   r        -- Length of polar vector
%   theta    -- Angle of vector in degrees
%   x        -- x-position of point
%   y        -- y-position of point

%  Record of revisions:
%      Date       Programmer          Description of change
%      ====       ==========          =====================
%    02/01/07    S. J. Chapman        Original code 

x = r * cos(theta * pi/180);
y = r * sin(theta * pi/180);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -