matlab

a = load('C:UserswhlDesktopQ-learning.txt');
b = load('C:UserswhlDesktopRound Robin.txt');
x=a(:,1);
y=a(:,2);
m=b(:,1);
n=b(:,2);
plot(x,y,':r*',m,n,'-bo')
h=legend('Q-Learning算法','轮询算法');%获得句柄
set(h,'FontSize',14);%设置属性
h=ylabel('PF吞吐量/数据包数');%设置纵坐标
set(h,'FontSize',14)
h=xlabel('迭代次数/次');%设置横坐标
set(h,'FontSize',14)

  

原文地址:https://www.cnblogs.com/whl2012/p/3261588.html