www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/ExamplePlotaGaussianDistributionExample.m
%% 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 function with the equivalent % |step| syntax. For example, myObject(x) becomes step(myObject,x). %% % View a _Gaussian_, or normal, distribution on the Array Plot figure. %% % Create a new Array Plot object. h = dsp.ArrayPlot; %% % Configure the properties of the Array Plot object for a Gaussian distribution. h.YLimits = [0 1]; h.XOffset = -2.5; h.SampleIncrement = 0.1; h.Title = 'Gaussian distribution'; h.XLabel = 'X'; h.YLabel = 'f(X)'; %% % Call the |<docid:dsp_ref.btqzjdu-1 step>| method to plot a Gaussian distribution. h(exp(-(-2.5:.1:2.5).*(-2.5:.1:2.5))');