写论文时候制作折线图用MATLAB做还是比较正式,记录一个简单的小程序
x=5:5:50;
a=[75.256,76.704,75.263,75.337,75.599,76.302,75.824,76.924,75.595,75.442];
b=[72.112,70.768,68.63,68.201,64.067,61.717,61.476,61.561,61.066,61.586];
plot(x,a,'*-r');
hold on
plot(x,b,'--.b');
axis([5,50,55,80])
set(gca,'XTick',[5:5:50]) %改变x轴坐标间隔显示 这里间隔为10
set(gca,'YTick',[55:5:80]) %改变y轴坐标间隔显示 这里间隔为10
legend('sinx',0);
xlabel('The number of training')
ylabel('Evacuation time(s)')