matlab将多条曲线绘制在一起

 

        figure;
        hold on;
        for i=1:30
            plot(x(i,:),y(i,:));
        end

 

x=1:0.2:(2*pi);
 hold on
 for i=1:9
     y=sin(x+i*pi/10)+exp(x/5);
     plot(x,y,'.-','Color',[(0.7+0.1/i)^2 1-(0.1*i) 0.5/i^2],'LineWidth',2+0.5*i);
     str{i}=['H=',mat2str(i*0.01)];
 end
 legend(str)
 hold off

 

posted @ 2015-10-14 16:27  太一吾鱼水  阅读(3642)  评论(0编辑  收藏  举报