数字仿真技术——matlab和simulink基础.ppt

使用MATLAB的窗口环境 打开软件界面进行讲解 随时获取帮助! MATLAB程序设计 function p = angle(h) %ANGLE Phase angle. % ANGLE(H) returns the phase angles, in radians, of a matrix with % complex elements. % % Class support for input X: % float: double, single % % See also ABS, UNWRAP. % Copyright 1984-2004 The MathWorks, Inc. % $Revision: 5.7.4.1 $ $Date: 2004/06/25 18:51:44 $ % Clever way: % p = imag(log(h)); % Way well do it: p = atan2(imag(h), real(h)); MATLAB函数的结构 函数定义行:函数名必须与m文件名相同 左边是输出变量,右边是输入变量,可以是多个 H1行:函数帮助文本的第一行,命令“lookfor”查找某函数时显示该行信息 函数帮助文本,命令“help” 或“man”将显示该帮助信息 函数主体 MATLAB程序设计 MATLAB

文档评论(0)

1亿VIP精品文档

相关文档