# Gaussian  Noise

Aim: Estimation of Gaussian density and Distribution Functions.

EQUIPMENT:

PC with windows (95/98/XP/NT/2000).

MATLAB Software

Program-1

Program:

%% Closing and Clearing all

clc;

clear all;

close all;

%% Defining the range for the Random variable

dx=0.01; %delta x

x=-3:dx:3;

[m,n]=size(x);

%% Defining the parameters of the pdf

mu_x=0; % mu_x=input('Enter the value of mean');

sig_x=0.1; % sig_x=input('Enter the value of varience');

%% Computing the probability density function

px1=[];

a=1/(sqrt(2*pi)*sig_x);

for j=1:n

px1(j)=a*exp([-((x(j)-mu_x)/sig_x)^2]/2);

end

%% Computing the cumulative distribution function

cum_Px(1)=0;

for j=2:n

cum_Px(j)=cum_Px(j-1)+dx*px1(j);

end

%% Plotting the results

figure(1)

plot(x,px1);grid

axis([-3 3 0 1]);

title(['Gaussian pdf for mu_x=0 and sigma_x=', num2str(sig_x)]);

xlabel('--> x')

ylabel('--> pdf')

figure(2)

plot(x,cum_Px);grid

axis([-3 3 0 1]);

title(['Gaussian Probability Distribution Function for mu_x=0 and sigma_x=', num2str(sig_x)]);

title('\ite^{\omega\tau} = cos(\omega\tau) + isin(\omega\tau)')

xlabel('--> x')

ylabel('--> PDF')

Ouput:

Result: :  Gaussian density and Distribution Functions are estimated.

• Updated
Dec 10, 2019
• Views
865
You May Like