Matlab与机电系统仿真(五).pptVIP

  • 5
  • 0
  • 约1.72千字
  • 约 25页
  • 2018-12-07 发布于河南
  • 举报
Matlab与机电系统仿真(五)

Matlab与机电系统仿真(五) ------自定义函数;;程序模块化:;函数与脚本文件;function [out_1, out_2, …]=fname(in_1, in_2, …) % first comment line ( lookfor) % other comment lines (help) …… statement_1; statement_2; …… (return) ;function [c,d]=fun1(a,b) % addition 1 % [x+1,y+1]=fun1(x,y) c=a+1; d=b+1;;Matlab函数的参数传递:;函数的辅助选项:;function [sex,job,appearance]=dounof(x1,x2,x3,x4,x5) % Do you know of somebody? % return the evaluation of somebody: % dounof(name1,...,name5) error(nargchk(1,5,nargin)); disp( ); disp( ); disp(========================================); disp([The number of input

文档评论(0)

1亿VIP精品文档

相关文档