Matlab 绘图,文件名为变量肿么办

来源:互联网 发布:最好用的纹身单片机 编辑:程序博客网 时间:2024/06/05 06:12
for i=1:100
    filename=strcat('RTT/path',num2str(asn12322_counter(i,1)-1),'_loss_smooth_30.dat');
    tmpfile=load(filename);
    h1=plot((tmpfile(:,1)-asn12322(1,1))/60, tmpfile(:,3));
    legend(h1,strcat('path',num2str(asn12322_counter(i,1)-1),', ',path_names(asn12322_counter(i,1)-1,1)));
    hold on;
end

id=663
filanem=strcat('RTT/path',num2str(id),'_indicator_loss.dat')
tmpfile=load(filename)
h1=plot((tmpfile(:,1)-asn12322(1,1))/60, tmpfile(:,2))
legend(h1,strcat('path',num2str(id),', ',path_names(id,1)));
0 0
原创粉丝点击