Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Help needed for code in matlab
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Savdulla

Posts: 1
Registered: 11/23/12
Help needed for code in matlab
Posted: Nov 23, 2012 6:35 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I have a m-file (File 1) in matlab that generates me two vectors Sx = [a1 a2 a3] and Sy = [b1 b2 b3].
I have another m-file (File 2) with genetic algorithm code in it that generates X1 and X2 for minimum solution of a function to be minimized. The function to be minimized is in another m-file (Fle 3) that calculates the distance D = Sum (1/ sqrt[ (X1 - a1)^2 + (X2 - b1)^2] + sqrt[ (X1 - a2)^2 + (X2 - b2)^2] +sqrt[ (X1 - a3)^2 + (X2 - b3)^2]).


I would like to make it a general, to be user decision on the size of the vectors Sx and Sy. Ideally would be to run the genetic algorithm file few times to get different solutions.

Anybody can help with the code will be greatly appreciated.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.