Search All of the Math Forum:

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

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

Topic: solving matrices of non liner third order type
Replies: 12   Last Post: May 24, 2013 2:30 AM

 Messages: [ Previous | Next ]
 Torsten Posts: 1,717 Registered: 11/8/10
Re: solving matrices of non liner third order type
Posted: May 15, 2013 5:55 AM

"Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvibo\$3rj\$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kmve6l\$mq3\$1@newscl01ah.mathworks.com>...
> > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvcrf\$jbj\$1@newscl01ah.mathworks.com>...
> > > hiii..
> > > i tried to solve this matrices but i couldnot because it ends up with non linear third order equations please help me out in this issue and give a program to solve this....
> > > your help is highly appriciated!!
> > > syms bcf0 bcf1 bcf2 bcf3 bcf4 bcf5 q0 q1 q2
> > >
> > >
> > > amatrix=[ 12.0, 0, 9.0, 12.0, 0, 9.0; 12.0, 4.39*10^(-4), 9.0, 12.0, 0, 9.0; 12.0, 0, 9.0, 12.0, 0, 9.0; 12.0, 0, 9.0, 12.3, 0, 9.01; 12.0, 0, 9.0, 12.0, 0.00703, 9.0; 12.0, 0, 9.0, 12.0, 0, 9.0];
> > >
> > >
> > > acoeff=[ bcf0;bcf1;bcf2;bcf3;bcf4;bcf5];
> > >
> > >
> > > bmatrix =[ 47.3, 42.3, 19.4; -1.63*10^(-19), 4.53*10^(-21), -1.03*10^(-15);1.69, 3.52, 1.47;23.6, 21.1, 9.7;-2.45*10^(-19), 6.79*10^(-21), -5.17*10^(-16);0.844, 1.76, 0.737];
> > >
> > > bcoeff=[q0^2;q1^2;q2^2];
> > >
> > > cmatrix =[ 16.4, -0.0774, 0.193; -0.0774, 0.724, -0.00177; 0.193, -0.00177, 0.0645];
> > >
> > > ccoeff=[q0;q1;q2];
> > > dmatrix =[ 1.65, 0.0571, 0.00251, -1.65, -0.127, -0.00528;2.45*10^(-18), -4.26*10^(-19), 7.37*10^(-20), 7.09*10^(-17), 4.26*10^(-19), 4.58*10^(-19);0.00302, 8.52*10^(-4), 6.98*10^(-5), -0.0733, -9.76*10^(-4), -6.98*10^(-5)];
> > >
> > > dcoeff=[bcf0*q0;bcf1*q1;bcf2*q2; bcf3*q0;bcf4*q1;bcf0*q2];
> > >
> > > (amatrix)*(acoeff)=bmatrix*(bcoeff);
> > > %from first statement find bcf values and use it in second equation
> > > (cmatrix)*(ccoeff)=dmatrix*(dcoeff);
> > > %from second equation find the q0 q1 q2 value

> >
> > I don't see an easier way than using MATLAB's FSOLVE for your system of nonlinear equations.
> >
> > Best wishes
> > Torsten.

> Hi. mr.torsten..
> please can you give the code for that operation?

x0 = [-5; -5; -5; -5; -5; -5; -5; -5; -5]; % Make a starting guess at the solution
options = optimoptions('fsolve','Display','iter'); % Option to display output
[x,fval] = fsolve(@myfun,x0,options) % Call solver

function F = myfun(x)
bcf0=x(1);
bcf1=x(2);
bcf2=x(3);
bcf3=x(4);
bcf4=x(5);
bcf5=x(6);
q0=x(7);
q1=x(8);
q2=x(9);

amatrix=[ 12.0, 0, 9.0, 12.0, 0, 9.0; 12.0, 4.39*10^(-4), 9.0, 12.0, 0, 9.0; 12.0, 0, 9.0, 12.0, 0, 9.0; 12.0, 0, 9.0, 12.3, 0, 9.01; 12.0, 0, 9.0, 12.0, 0.00703, 9.0; 12.0, 0, 9.0, 12.0, 0, 9.0];
acoeff=[ bcf0;bcf1;bcf2;bcf3;bcf4;bcf5];
bmatrix =[ 47.3, 42.3, 19.4; -1.63*10^(-19), 4.53*10^(-21), -1.03*10^(-15);1.69, 3.52, 1.47;23.6, 21.1, 9.7;-2.45*10^(-19), 6.79*10^(-21), -5.17*10^(-16);0.844, 1.76, 0.737];
bcoeff=[q0^2;q1^2;q2^2];
cmatrix =[ 16.4, -0.0774, 0.193; -0.0774, 0.724, -0.00177; 0.193, -0.00177, 0.0645];
ccoeff=[q0;q1;q2];
dmatrix =[ 1.65, 0.0571, 0.00251, -1.65, -0.127, -0.00528;2.45*10^(-18), -4.26*10^(-19), 7.37*10^(-20), 7.09*10^(-17), 4.26*10^(-19), 4.58*10^(-19);0.00302, 8.52*10^(-4), 6.98*10^(-5), -0.0733, -9.76*10^(-4), -6.98*10^(-5)];
dcoeff=[bcf0*q0;bcf1*q1;bcf2*q2; bcf3*q0;bcf4*q1;bcf0*q2];

F=[amatrix*acoeff-bmatrix*bcoeff; cmatrix*ccoeff-dmatrix*dcoeff];

By the way: bcf0=bcf1=bcf2=bcf3=bcf4=bcf5=q0=q1=q2=0 is a solution which
might complicate the solution process.
Furthermore, scaling of your equations might be necessary because of the
difference in magnitude of the matrix coefficients.

Best wishes
Torsten.

Date Subject Author
5/15/13 Hari Kishore
5/15/13 Torsten
5/15/13 Hari Kishore
5/15/13 Torsten
5/15/13 Hari Kishore
5/15/13 Torsten
5/15/13 Torsten
5/15/13 Hari Kishore
5/15/13 Torsten
5/15/13 Torsten
5/15/13 Hari Kishore
5/23/13 Hari Kishore
5/24/13 Torsten