基于MATLAB的数值分析课件.pptVIP

  • 10
  • 0
  • 约5.28千字
  • 约 31页
  • 2017-08-18 发布于广东
  • 举报
第五章 自定义函数的计算 5.1 字符串数组 5.2 串演算函数 5.3 函数句柄 * * 函数的创建 用M文件 function f=fun(x) f=1./(1+x.^2); 内联函数 y=inline((3*x^2-1)/2,x); 3.字符串表达式(函数) theta=t/2,y=sin(theta)‘ 4.符号函数 一、字符串入门 【例1】先实际操作 本例,以体会数值量 与字符串的区别。 clear a=12345.6789 class(a) a_s=size(a) a = 1.2346e+004 ans = double a_s = 1 1 b=S class(b) b_s=size(b) b = S ans = char b_s = 1?? 1 whos Name Size Bytes Class ? a 1x1 8 double array a_s 1x2 16 double array ans 1x4 8 char array b 1x1 2

文档评论(0)

1亿VIP精品文档

相关文档