None.
Open in the MATLAB editor: g01ka_example
function g01ka_example fprintf('g01ka example results\n\n'); x = [1, 4, 0.1, 1]; xmean = [0, 2, 0, 0]; xstd = [1, 1, 0.01, 10]; result = x; fprintf(' x mean standard pdf\n'); fprintf(' deviation\n'); for i=1:numel(x) [result(i), ifail] = g01ka( ... x(i), xmean(i), xstd(i)); end fprintf('%13.5e %13.5e %13.5e %13.5e\n', [x; xmean; xstd; result]); g01ka_plot; function g01ka_plot fig1 = figure; hold on; xmean = [0, 0, 1]; xstd = [1, 0.3, 0.6]; x{1} = [-3:0.05:3]; x{2} = [-1.2:0.025:1.2]; x{3} = [-1:0.05:3]; mu = '\mu'; sigma = '\sigma'; for i=1:3 for j=1:numel(x{i}) [y{i}(j), ifail] = g01ka( ... x{i}(j), xmean(i), xstd(i)); end plot(x{i},y{i}); l{i} = sprintf('%s = %3.1f, %s = %3.1f', mu, xmean(i), sigma, xstd(i)); end legend(l); xlabel('x'); title('Gaussian Functions (or Normal Distributions)'); hold off;
g01ka example results x mean standard pdf deviation 1.00000e+00 0.00000e+00 1.00000e+00 2.41971e-01 4.00000e+00 2.00000e+00 1.00000e+00 5.39910e-02 1.00000e-01 0.00000e+00 1.00000e-02 7.69460e-21 1.00000e+00 0.00000e+00 1.00000e+01 3.96953e-02