(matlab) figure中畫多條線,並對每條線依次加標註

t = 0 : 0.01 : 5; x = sin(t); y = cos(t); figure plot(t, x,'red--');  % 繪製正弦曲線 hold on;  % 將正弦曲線保持在圖形中 plot(t, y,'y+'); % 繪製餘弦曲線,完成後圖形中就會同時顯示正弦曲線和餘弦曲線 hold on z=x+y; plot(t,z,'b:.') hold on g=x.*y; pl
相關文章
相關標籤/搜索