Matlab for循环画图加legend

x = 1:10; for i = 1:4 y = i*x; h = plot(x,y); hold on end legend(h([1,2,3,4]),'y1','y2','y3','y4')  在 for 循环中根据循环改变 legend,效果图以下html 转载于:https://www.cnblogs.com/qinghev/p/9974785.htmlpo
相关文章
相关标签/搜索