Thread Subject:
Help needed for code in matlab

Subject: Help needed for code in matlab

From: Savdulla

Date: 23 Nov, 2012 23:35:08

Message: 1 of 1

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.

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
genetic algorithm Savdulla 23 Nov, 2012 18:39:09
for loops Savdulla 23 Nov, 2012 18:39:09
rssFeed for this Thread

Contact us