www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/PlotSineFunctionExample.m

    %% Plot Sine Function
% Plot the sine function over the domain $-\pi \leq x \leq \pi$.

% Copyright 2015 The MathWorks, Inc.

x = -pi:0.01:pi;
plot(x,sin(x)), grid on