How can I use gamultiobj to find all the solutions of a nonlinear system?
1 view (last 30 days)
Show older comments
Hi, I would like to solve a nonlinear system having multiple solutions. Instead of using fsolve I would like to obtain at the same time all the numerical solutions. I read that a way to do this is by exploiting the function gamultiobj and to translate the problem into a minimization one. I then wrote the main file:
FitnessFunction=@fun_GA2;
numberOfVariables = 2;
options = gaoptimset('Generations', 100, 'PopulationSize', 100);
[X,FVAL,EXITFLAG,OUTPUT] = gamultiobj(FitnessFunction,numberOfVariables,[],[],[],[],[],[],options)
with
function y=fun_GA2(x)
y(1)=abs(-1/2*x(1)+8*1./(1+exp(-2*(x(1)-1)))-14*1./(1+exp(-2*(x(2)-1)))+10);
y(2)=abs(-1/2*x(2)-2*1./(1+exp(-2*(x(2)-1)))+56*1./(1+exp(-2*(x(1)-1)))+10);
In this way I obtained an X matrix having size 28x2 representing only one solutions. How can I find the other solutions of the nonlinear system?
0 Comments
Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!