summaryrefslogtreecommitdiff
path: root/energy_vs_stability.m
blob: da03f890abb743a4c17236c407eda7a9a1a6a07f (plain)
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
function [] = energy_vs_stability( possible_energy, stability, index )
%ENERGY_VS_STABILITY Summary of this function goes here
%   Detailed explanation goes here

    n = size(stability,2);
    c = 1:n;
    
    for i=1:n
        fixed_stability(i,1) = stability(i);
    end
    
    for i = 1:n
        energy(i,1) = possible_energy(index(i));
    end
    
    figure(n+1)
    textCell = arrayfun(@(x,y) sprintf('(%3.2f, %3.2f)',x,y),energy,fixed_stability,'un',0);
    scatter(energy,fixed_stability,25,c,'filled');
    xlabel('Energy');
    ylabel('Stability');
    
    dx =0.000000005;
    dy =0.000000005;
    
    for i = 1:n
        n_solution = num2str(i);
        text(energy(i)+dx, fixed_stability(i)+dy, n_solution, 'FontSize',12);
    end
    
%     for i = 1:n
%         text(energy(i), fixed_stability(i), textCell{i}, 'FontSize',8)
%     end
    
end