MATLAB 引导
作者:精通MATLAB(5.3版) 来源:转载http://www.51base.com/machine/softedu/cam/matlab/5120060126152.shtml 发布时间:2008-4-16 9:28:37
3.1 引导
【 * 例 3.1-1 】 绘制函数 在 时的曲线。
x=0:0.1:1 % 定义自变量的采样点取值数组
y=x.*exp(-x) % 利用数组运算计算各自变量采样点上的函数值
plot(x,y),xlabel('x'),ylabel('y'),title('y=x*exp(-x)') % 绘图
x =
Columns 1 through 7
0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000
Columns 8 through 11
0.7000 0.8000 0.9000 1.0000
y =
Columns 1 through 7
0 0.0905 0.1637 0.2222 0.2681 0.3033 0.3293
Columns 8 through 11
0.3476 0.3595 0.3659 0.3679
文章评论 (评论内容只代表网友观点,与本站立场无关!)

您当前的位置: