www.gusucode.com > graphics 案例源码程序 matlab代码 > graphics/SetyAxisLimitsExample.m
%% Set _y_-Axis Limits % Plot a line and set the _y_-axis limits to range from -2 to 2. % Copyright 2015 The MathWorks, Inc. x = linspace(0,10); y = sin(x); plot(x,y) ylim([-2 2])