-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_Equi_EnEqui.m
43 lines (37 loc) · 1011 Bytes
/
test_Equi_EnEqui.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% test Equidistribution and Enhanced Equidistribution
imax = 254;
h = 512;
w = 512;
% generate random sequence
u = randi(imax,[h,w]);
% Equidistribution
ue = equidistribution(u,imax);
% Enhanced Equidistribution
uee = enhanced_equidistribution(u,imax);
% plot
fz = 35;
figure;
subplot(131);
histogram(u,imax);
xlim([1,imax]);
xlabel('Values','FontSize',fz);
ylabel('Frequency','FontSize',fz);
title('Standard Uniform Distribution','FontSize',fz);
set(gca,'FontSize',fz);
set(gca,'FontName','Times New Roman');
subplot(132);
histogram(ue,imax);
xlim([1,imax]);
xlabel('Values','FontSize',fz);
ylabel('Frequency','FontSize',fz);
title('Equidistribution','FontSize',fz);
set(gca,'FontSize',fz);
set(gca,'FontName','Times New Roman');
subplot(133);
histogram(uee,imax);
xlim([1,imax]);
xlabel('Values','FontSize',fz);
ylabel('Frequency','FontSize',fz);
title('Enhanced Equidistribution','FontSize',fz);
set(gca,'FontSize',fz);
set(gca,'FontName','Times New Roman');