MATLAB画的,附上代码:
clear all
x1 = -5:0.001:5
x2 = 0.01:0.001:20;
y1 = 1.2.^x1;
y2 = 2.*x1;
y3 = log2(x2);
y4 = 0.2.*x2;
figure(1)
plot(x1,y1,x1,y2,'LineWidth',2)
legend('y=1.2^x','y=2x')
grid on
figure(2)
plot(x2,y3,x2,y4,'LineWidth',2)
legend('y=log2(x)','y=0.2x')
grid on