www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/PlotaSingleDataSeriesatSpecifiedxValuesExample.m
%% Plot Single Data Series at Specified x-Values % Create a stairstep plot of a sine wave evaluated at equally spaced values % between 0 and $4\pi$. Specify the set of _x_-values for the plot. % Copyright 2015 The MathWorks, Inc. %% X = linspace(0,4*pi,40); Y = sin(X); figure stairs(X,Y) %% % The entries in |Y| are plotted against the corresponding entries in |X|.