0

I'm implementing an image reconstruction method using genetic algorithm (for optimization). I randomly opted 10 population(each population is an image with intensity values in row major order) as follows

for i = 1:population_size
   eval(['population_' num2str(i) '= (randi([MinIntensity,MaxIntensity],1,No_of_Individuals))']);
end

My question is, can I choose the initial population similar to the image (i.e. the reconstructed image) does the genetic algorithm will converge quickly? If yes, how to initialize the population similar to the reconstructed image (assume that I have a reconstructed image with me).

Aziz Shaikh
  • 16,245
  • 11
  • 62
  • 79
Celine
  • 115
  • 1
  • 5
  • 13
  • I don't know how to answer your question but there is [no need to use `eval`](http://www.mathworks.com/help/matlab/matlab_prog/string-evaluation.html) here. You can use a [multi-dimensional array](http://www.mathworks.com/help/matlab/math/multidimensional-arrays.html), a [data structure](http://www.mathworks.com/help/matlab/structures.html) (e.g. `mydata.population(i)`), or [dynamic field references](http://blogs.mathworks.com/loren/2005/12/13/use-dynamic-field-references/). – sco1 Apr 03 '15 at 12:41
  • You should really review your question. It is hard to understand what you mean. – Steffen Apr 06 '15 at 13:59
  • @Steffen Editted the question.Kindly go through it. – Celine Apr 07 '15 at 05:45

0 Answers0