Changeset 46 for liacs/nc/low-correlation/mcs.m
- Timestamp:
- Dec 18, 2009, 1:43:33 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
liacs/nc/low-correlation/mcs.m
r43 r46 8 8 % autocorrelation(best_20); 9 9 10 function [fitness,value] = mcs(length, iterations) 10 function [iteration_history,fitness_history] = mcs(length, iterations) 11 iteration_history = []; 12 fitness_history = []; 13 11 14 best_fitness = 0; 12 for i = 1:iterations15 for iteration = 1:iterations 13 16 % Generate a random column s={-1,1}^n 14 17 n = length; … … 23 26 best_fitness = fitness; 24 27 end 28 iteration_history = [ iteration_history, iteration ]; 29 fitness_history = [ fitness_history, best_fitness ]; 25 30 end 26 fitness = best_fitness;27 value = best_value;28 31 end
Note:
See TracChangeset
for help on using the changeset viewer.