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

    %% Create Scatter Plot  

% Copyright 2015 The MathWorks, Inc.


%% 
% Create |x| as 200 equally spaced values between 0 and $3\pi$. Create |y|
% as cosine values with random noise. Then, create a scatter plot.
x = linspace(0,3*pi,200);
y = cos(x) + rand(1,200);  
scatter(x,y)