You are on page 1of 1

NAKAGAMI DISTRIBUTION

Submitted by: Nimra Nazeer


Registration no: 2015-EE-305
MATLAB Code:
clc;
colors=['r','g','b','y'] ;
m = 3.004;
x = [0:0.05:4];
for w = 1:4
for ii = 1:length(x)
y(ii)=((2*m^m)/(gamma(m)*w^m))*x(ii)^(2*m-1)*exp(-((m/w)*x(ii)^2));
end
plot(x,y,colors(w))
hold on
end
xlabel('CGPA’);
ylabel('PDF');
title('probability density function')
hleg1 = legend('w=1','w=2','w=3','w=4');
set(hleg1,'Location','NorthEast')
axis([0 4 0 2]);
grid on

Graph:

probability density function


2
w=1
1.8 w=2
w=3
1.6 w=4

1.4

1.2
PDF

0.8

0.6

0.4

0.2

0
0 0.5 1 1.5 2 2.5 3 3.5 4
Support
CGPA

You might also like