%% Plot a Gaussian Distribution
% *Note*: This example runs only in R2016b or later. If you are using an earlier 
% release, replace each call to the object with the equivalent |step| syntax. 
% For example, |myObject(x)| becomes |step(myObject,x)|.
% 
% Create a new Array Plot object.  

scope = dsp.ArrayPlot;
%% 
% Configure the properties of the Array Plot object for a Gaussian distribution. 
%%
scope.YLimits = [0 1];
scope.XOffset = -2.5;    
scope.SampleIncrement = 0.1;
scope.Title = 'Gaussian distribution';
scope.XLabel = 'X';
scope.YLabel = 'f(X)';
%% 
% Call the Array Plot object to plot a Gaussian distribution. 
%%
scope(exp(-(-2.5:.1:2.5).*(-2.5:.1:2.5))')

%% 
% Copyright 2012 The MathWorks, Inc.