How to use Genetic Algorithm ?

3 views (last 30 days)
Mahak SINGH CHAUHAN
Mahak SINGH CHAUHAN on 14 Apr 2014
I have a system of equations as given following:
z=[3 7 10 27 30 42]; p=[10.2 8.7 7.1 6.4 3.2 2];
PROBLEM: ((x1*x2)+x2-(x3*x4)+z)/((x1-x2)*z+(x3*x4))=p;
As I have 4 unknowns(x1,x2,x3,x4), z and p is a vectors So I need at least 4 equations to solve this problem. I have length(z)=length(p)=6, It means I have 6 equation and 4 unknown to solve.
How can I use genetic algorithm to solve this problem. As I saw in MATLAB help command is given like that: [x,fval,exitflag,output] = ga(fitnessfcn,nvars,A,b,Aeq,beq,LB,UB,nonlcon,options),
How should use this to solve my problem. Thanks in Advance

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!