📄 p2r.m
字号:
function [r,im]=p2r(mag,ph)
%P2R Converts polar to rectangular co-ordinates.
% P2R(MAG,PH) converts the magnitude and phase in
% degrees to a complex vector or matrix.
%
% [R,IM]=P2R(MAG,PH) returns the real and
% imaginary parts separately.
% Dr M.P. Ford 4th August 1987
% Copyright (c) 1987 by GEC Engineering Research Centre & Cambridge Control Ltd
% MRN0019
r=mag.*exp(ph.*(sqrt(-1)*pi/180));
if nargout==2
im=imag(r);
r=real(r);
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -