正在加载图片...
MATLAB作图 例在[-1,2]上画图形y=e+sm(3x-) 解先建M文件 my fun1.m: function Y=mmy fun(x) Y=exp(2*x)+sin(3*x.2) Matlab iti43 输入命令:£p1ot( myfun1′,[-1,2]) 例在[-2,2范围内绘制函数tanh的图形 解 plots(tanh’,-2,2|) Matlab iti28 tanh返回指定角度的双曲正切值 例画tnh(x,sin(x,eos(x.x,y取值范围[-2n,2n 解输入命令: Matlab iti42 fplot(tanh(x), sin(x), cos(x),, 2*pi[-1 1-1 ld例 在[-1,2]上画图形 输入命令:fplot(‘myfun1’,[-1,2]) Matlab liti43 Matlab liti28 解 输入命令: fplot(‘[tanh(x),sin(x),cos(x)]’,2*pi*[-1 1 –1 1]) 例 在[-2,2]范围内绘制函数tanh的图形 Matlab liti42 MATLAB作图 解 先建M文件myfun1.m: function Y=myfun1(x) Y=exp(2*x)+sin(3*x.^2) sin( 3 ) 2 2 y e x x = + 解 fplot(‘tanh’,[-2,2]) tanh 返回指定角度的双曲正切值 例 画tanh(x),sin(x),cos(x). x,y取值范围 [−2 ,2 ]
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有