-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathseeEnergyDistribution.m
29 lines (24 loc) · 1.16 KB
/
seeEnergyDistribution.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
function seeEnergyDistribution(nonscaled_weight, varargin )
%illustrates Energy landscape and landscape energy distribution
w = nonscaled_weight;
figure;
n = nargin; %number of variable inputs
subplot(211); plot (w);
title('Energy Landscape'); ylabel('Network Energy'); xlabel('State');
xlim([ 0 length(w)/2]); %since energy landscape is symmetric, display only half
hold on;
subplot(212);
histogram(w, 'Normalization', 'Probability', 'BinWidth', 10); %display frequency distribution of al possible energy states
title('Landscape Energy Distribution'); ylabel('Frequency'); xlabel('Network Energy');
hold on;
% for i = 1:n-1
% subplot(211); plot (varargin{i});
% title('Energy Landscape'); ylabel('Network Energy'); xlabel('State');
% xlim([ 0 length(w)/2]); legend ('Normal Weighting', 'Pathological Weighting');
% hold on;
% subplot(212);
% histogram(varargin{i}, 'Normalization', 'Probability', 'BinWidth', 10); legend ('Normal Weighting', 'Pathological Weighting');
% title('Landscape Energy Distribution'); ylabel('Frequency'); xlabel('Network Energy');
% hold on;
% end
hold off;