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