Last change
on this file since 39 was 39, checked in by Rick van der Zwet, 15 years ago |
Make it run properly (iterations vs fitness)
|
File size:
530 bytes
|
Line | |
---|
1 | % Simulated Annealing low-autocorrelation program
|
---|
2 | % BSDLicence
|
---|
3 | % Rick van der Zwet - 0433373 - <hvdzwet@liacs.nl>
|
---|
4 |
|
---|
5 | %% Basic variables
|
---|
6 | iterations = 100000;
|
---|
7 | length = 20;
|
---|
8 |
|
---|
9 |
|
---|
10 | % Always use the same innitial values
|
---|
11 | s = initseq(length);
|
---|
12 |
|
---|
13 | % Plot the stuff
|
---|
14 | [iteration_history, fitness_history] = sa(s,iterations);
|
---|
15 |
|
---|
16 | plot(iteration_history,fitness_history);
|
---|
17 | title(sprintf('Simulated Annealing on Low-Corretation set'));
|
---|
18 | ylabel('fitness');
|
---|
19 | xlabel('iterations');
|
---|
20 | grid on;
|
---|
21 | legend(sprintf('Length %i',length));
|
---|
22 | print('sa-fitness.eps','-depsc2');
|
---|
Note:
See
TracBrowser
for help on using the repository browser.