www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/StemPlotMultipleDataSeriesatUniqueSetsofxvaluesExample.m
%% Plot Multiple Data Series at Unique Sets of x values % Plot 50 data values of sine and cosine evaluated at different sets of % _x_ values. Specify the corresponding sets of _x_ values for each series. % Copyright 2015 The MathWorks, Inc. %% figure x1 = linspace(0,2*pi,50)'; x2 = linspace(pi,3*pi,50)'; X = [x1, x2]; Y = [cos(x1), 0.5*sin(x2)]; stem(X,Y) %% % Each column of |X| is plotted against the corresponding column of |Y|.