The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Help needed for code in matlab
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.