Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
Chirag
Posts:
2
Registered:
11/6/09
|
|
Pls Help me to solve
Posted:
Nov 6, 2009 12:17 PM
|
|
Dear Readers I m facing problem in solving set of nonliner equations. Set contains 13 nonlinear equations and 13 variables. I've spent lots of time but unfortunately couldn't solve it.... I've tried so far solve and fsolve commands....... When I am using solve my computer gets hanged. And fsolve is returning complex number which is practically not possible......
I've made two files
1st File:function file
function F=myfun(x) F=[-22.47+log(x(1)/(x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x(10)))+(3*x(11))+(3*x(12))+(8*x(13));-24.89+log(x(2)/((x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x(10))))+x(12)+(2*x(13));-49.539+log(x(3)/((x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x(10))))+x(11)+(2*x(12));-0.0574+log(x(4)/((x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x(10))))+(2*x(13));-24.597+log(x(5)/((x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x(10))))+x(11)+x(12);-0.7027+log(x(6)/((x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x(10))))+x(11)+(4*x(13));-32.59+log(x(7)/((x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x(10))))+(2*x(11))+(2*x(12))+(4*x(13));-10.927+log(x(8)/((x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x(10))))+x(11)+x(12)+(4*x(13));-4.635+log(x(9)/((x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x(10))))+(2*x(11))+(x(12))+(6*x(13));-7.5188+log(x(10)/((x(1)+x(2)+x(3)+x(4)+x(5)+x(6)+x(7)+x(8)+x(9)+x (10))))+(2*x(11))+(x(12))+(4*x(13));3*x(1)+x(3)+x(5)+x(6)+2*x(7)+x(8)+2*x(9)+2*x(10)-0.1002;3*x(1)+x(2)+2*x(3)+x(5)+2*x(7)+x(8)+x(9)+x(10)-1.6332;8*x(1)+2*x(2)+2*x(4)+4*x(6)+4*x(7)+4*x(8)+6*x(9)+4*x(10)-3.3332]
2nd file: calls the function
clc clear all x0=[2;13;13;13;13;13;13;13;13;13;1;1;1] %initial guess options=optimset('Display','iter'); % Option to display output [x,fval] = fsolve(@myfun,x0,options) % Call optimizer
It would be great help if u can give me some guidance to solve it.....
Thank You
|
|
|
|