% File: E6_001.M

clear;

% Set m, and sigma


fprintf('\nThe following parameter values have been selected:\n')
m      = -1;
sigma  = 2;

fprintf('\nA      = %g',m);
fprintf('\nsigma  = %g\n',sigma);


v = -8:0.1:8;

% Compute f(v)
for (i = 1:1:length(v))
    f(i) = (1/(sqrt(2*pi)*sigma))*exp(-(v(i)-m)^2/(2*sigma^2));
end;


% Plot result
plot(v,f);
xlabel('v');
ylabel('f(v)');
title('Gaussian pdf');
fprintf('\nSee Window for plot.\n');