y=x.*exp(-x)
plot(x,y),xlabel('x'),ylabel('y'),title('y=x*exp(-x)')
然后我在command窗口中依次输入:
>> x=0:0.1:1
x =
0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000 1.0000
>> y=x.*exp(-x)
y =
0 0.0905 0.1637 0.2222 0.2681 0.3033 0.3293 0.3476 0.3595 0.3659 0.3679
>> plot(x,y),xlable('x'),ylable('y'),title('y=x*exp(-x)')
??? Undefined function or method 'xlable' for input arguments of type 'char'.
此时已经弹出结果所对应的图了,但是为什么报错了呢?
这不图都出来了,丫的matlab咱还嚷嚷呢?!
还好,这次没放过,觉得还是哪里不对,赶紧在命令行键入如下指令:
>> help xlable
xlable not found.
是不matlab出问题了,然后直接打开GUI上的help窗口,输入xlable&#