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

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)));

你可能感兴趣的:(Matlab 绘图,文件名为变量肿么办)