www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/PlotMultipleLines1Example.m
%% Plot Multiple Lines % This example shows how to plot more than one line by passing multiple % |x,y| pairs to the |plot| function. % % Define |y1| and |y2| as sine waves with a phase shift. % Copyright 2015 The MathWorks, Inc. x = linspace(0,2*pi,100); y1 = sin(x); y2 = sin(x-pi/4); %% % Plot the lines. figure plot(x,y1,x,y2) %% % |plot| cycles through a predefined list of line colors.