Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
solving matrices of non liner third order type

Subject: solving matrices of non liner third order type

From: Hari Kishore

Date: 15 May, 2013 07:18:07

Message: 1 of 13

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

Subject: solving matrices of non liner third order type

From: Torsten

Date: 15 May, 2013 07:41:09

Message: 2 of 13

"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.

Subject: solving matrices of non liner third order type

From: Hari Kishore

Date: 15 May, 2013 08:52:08

Message: 3 of 13

"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?

Subject: solving matrices of non liner third order type

From: Torsten

Date: 15 May, 2013 09:55:09

Message: 4 of 13

"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.

Subject: solving matrices of non liner third order type

From: Hari Kishore

Date: 15 May, 2013 10:44:09

Message: 5 of 13

"Torsten" wrote in message <kmvm1t$d83$1@newscl01ah.mathworks.com>...
> "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];
> > > >
> > > >
mr.torsten
actually there is no need of any guess for bcf.. bcfs's are to be find int terns of q0 q1 q2 fromfirst equation and substitute in second equation.. so final equtions would be.. 3 equations in 3 variables..
> > > > 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.

Subject: solving matrices of non liner third order type

From: Torsten

Date: 15 May, 2013 10:53:08

Message: 6 of 13

"Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvotp$kb6$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kmvm1t$d83$1@newscl01ah.mathworks.com>...
> > "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];
> > > > >
> > > > >
> mr.torsten
> actually there is no need of any guess for bcf.. bcfs's are to be find int terns of q0 q1 q2 fromfirst equation and substitute in second equation.. so final equtions would be.. 3 equations in 3 variables..
> > > > > 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.

Why including such complicated things as inversion of ill-conditioned matrices ?
Solve in 9 instead of 3 unknowns - the result should come out the same (x(7)-x(9) should be the values for q0,q1 and q2).

Best wishes
Torsten.

Subject: solving matrices of non liner third order type

From: Torsten

Date: 15 May, 2013 10:58:09

Message: 7 of 13

"Torsten" wrote in message <kmvpek$lm7$1@newscl01ah.mathworks.com>...
> "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvotp$kb6$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <kmvm1t$d83$1@newscl01ah.mathworks.com>...
> > > "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];
> > > > > >
> > > > > >
> > mr.torsten
> > actually there is no need of any guess for bcf.. bcfs's are to be find int terns of q0 q1 q2 fromfirst equation and substitute in second equation.. so final equtions would be.. 3 equations in 3 variables..
> > > > > > 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.
>
> Why including such complicated things as inversion of ill-conditioned matrices ?
> Solve in 9 instead of 3 unknowns - the result should come out the same (x(7)-x(9) should be the values for q0,q1 and q2).
>
> Best wishes
> Torsten.

As I notice now, your matrix "amatrix" does not have full rank - so writing bfc0,...,bfc5 in terms of q0,q1,q2 is _not_ possible.

Best wishes
Torsten.
 

Subject: solving matrices of non liner third order type

From: Hari Kishore

Date: 15 May, 2013 11:19:08

Message: 8 of 13

"Torsten" wrote in message <kmvpo1$mgt$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kmvpek$lm7$1@newscl01ah.mathworks.com>...
> > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvotp$kb6$1@newscl01ah.mathworks.com>...
> > > "Torsten" wrote in message <kmvm1t$d83$1@newscl01ah.mathworks.com>...
> > > > "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];
> > > > > > >
> > > > > > >
> > > mr.torsten
> > > actually there is no need of any guess for bcf.. bcfs's are to be find int terns of q0 q1 q2 fromfirst equation and substitute in second equation.. so final equtions would be.. 3 equations in 3 variables..
> > > > > > > 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.
> >
> > Why including such complicated things as inversion of ill-conditioned matrices ?
> > Solve in 9 instead of 3 unknowns - the result should come out the same (x(7)-x(9) should be the values for q0,q1 and q2).
> >
> > Best wishes
> > Torsten.
>
> As I notice now, your matrix "amatrix" does not have full rank - so writing bfc0,...,bfc5 in terms of q0,q1,q2 is _not_ possible.
>
> Best wishes
> Torsten.
> hi torsten
i got bcfs as
bcf0 =
 
2460.3445939155477396124188405012*q0^2 + 2005.1469061905712134056799285836*q1^2 + 933.87966673786928325461686686555*q2^2
 
 
bcf1 =
 
- 1506.3730730764235989294514736715*q0^2 - 5894.0059366351127299282966853176*q1^2 - 2378.8176863325236133957826187853*q2^2
 
 
bcf2 =
 
- 2041.7167782890462268040715539151*q0^2 + 2173.0522207347767936570916735661*q1^2 + 710.86523583882610199858733618617*q2^2
 
 
bcf3 =
 
105.52870667600759955941912217285*q0^2 + 175.4755723375273314765549101796*q1^2 + 74.715924919304469530976219135624*q2^2
 
 
bcf4 =
 
- 94.148317067276474944691156672796*q0^2 - 368.3753710396945456201963083999*q1^2 - 148.67610539578265233692702397997*q2^2
 
 
bcf5 =
 
- 1379.3741023619048976608972517102*q0^2 - 5080.2611955523277736891954259558*q1^2 - 2055.5432573246058074068282558192*q2^2
 

Subject: solving matrices of non liner third order type

From: Torsten

Date: 15 May, 2013 11:34:10

Message: 9 of 13

"Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvqvc$pk9$1@newscl01ah.mathworks.com>...
> "Torsten" wrote in message <kmvpo1$mgt$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <kmvpek$lm7$1@newscl01ah.mathworks.com>...
> > > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvotp$kb6$1@newscl01ah.mathworks.com>...
> > > > "Torsten" wrote in message <kmvm1t$d83$1@newscl01ah.mathworks.com>...
> > > > > "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];
> > > > > > > >
> > > > > > > >
> > > > mr.torsten
> > > > actually there is no need of any guess for bcf.. bcfs's are to be find int terns of q0 q1 q2 fromfirst equation and substitute in second equation.. so final equtions would be.. 3 equations in 3 variables..
> > > > > > > > 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.
> > >
> > > Why including such complicated things as inversion of ill-conditioned matrices ?
> > > Solve in 9 instead of 3 unknowns - the result should come out the same (x(7)-x(9) should be the values for q0,q1 and q2).
> > >
> > > Best wishes
> > > Torsten.
> >
> > As I notice now, your matrix "amatrix" does not have full rank - so writing bfc0,...,bfc5 in terms of q0,q1,q2 is _not_ possible.
> >
> > Best wishes
> > Torsten.
> > hi torsten
> i got bcfs as
> bcf0 =
>
> 2460.3445939155477396124188405012*q0^2 + 2005.1469061905712134056799285836*q1^2 + 933.87966673786928325461686686555*q2^2
>
>
> bcf1 =
>
> - 1506.3730730764235989294514736715*q0^2 - 5894.0059366351127299282966853176*q1^2 - 2378.8176863325236133957826187853*q2^2
>
>
> bcf2 =
>
> - 2041.7167782890462268040715539151*q0^2 + 2173.0522207347767936570916735661*q1^2 + 710.86523583882610199858733618617*q2^2
>
>
> bcf3 =
>
> 105.52870667600759955941912217285*q0^2 + 175.4755723375273314765549101796*q1^2 + 74.715924919304469530976219135624*q2^2
>
>
> bcf4 =
>
> - 94.148317067276474944691156672796*q0^2 - 368.3753710396945456201963083999*q1^2 - 148.67610539578265233692702397997*q2^2
>
>
> bcf5 =
>
> - 1379.3741023619048976608972517102*q0^2 - 5080.2611955523277736891954259558*q1^2 - 2055.5432573246058074068282558192*q2^2
>

Insert the expressions for bcf0,...,bcf5 and you'll see that the first matrix equation
amatrix*acoeff-bmatrix*bcoeff=0
is not satisfied.

Best wishes
Torsten.

Subject: solving matrices of non liner third order type

From: Torsten

Date: 15 May, 2013 11:52:10

Message: 10 of 13

"Torsten" wrote in message <kmvrri$rs2$1@newscl01ah.mathworks.com>...
> "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvqvc$pk9$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <kmvpo1$mgt$1@newscl01ah.mathworks.com>...
> > > "Torsten" wrote in message <kmvpek$lm7$1@newscl01ah.mathworks.com>...
> > > > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvotp$kb6$1@newscl01ah.mathworks.com>...
> > > > > "Torsten" wrote in message <kmvm1t$d83$1@newscl01ah.mathworks.com>...
> > > > > > "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];
> > > > > > > > >
> > > > > > > > >
> > > > > mr.torsten
> > > > > actually there is no need of any guess for bcf.. bcfs's are to be find int terns of q0 q1 q2 fromfirst equation and substitute in second equation.. so final equtions would be.. 3 equations in 3 variables..
> > > > > > > > > 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.
> > > >
> > > > Why including such complicated things as inversion of ill-conditioned matrices ?
> > > > Solve in 9 instead of 3 unknowns - the result should come out the same (x(7)-x(9) should be the values for q0,q1 and q2).
> > > >
> > > > Best wishes
> > > > Torsten.
> > >
> > > As I notice now, your matrix "amatrix" does not have full rank - so writing bfc0,...,bfc5 in terms of q0,q1,q2 is _not_ possible.
> > >
> > > Best wishes
> > > Torsten.
> > > hi torsten
> > i got bcfs as
> > bcf0 =
> >
> > 2460.3445939155477396124188405012*q0^2 + 2005.1469061905712134056799285836*q1^2 + 933.87966673786928325461686686555*q2^2
> >
> >
> > bcf1 =
> >
> > - 1506.3730730764235989294514736715*q0^2 - 5894.0059366351127299282966853176*q1^2 - 2378.8176863325236133957826187853*q2^2
> >
> >
> > bcf2 =
> >
> > - 2041.7167782890462268040715539151*q0^2 + 2173.0522207347767936570916735661*q1^2 + 710.86523583882610199858733618617*q2^2
> >
> >
> > bcf3 =
> >
> > 105.52870667600759955941912217285*q0^2 + 175.4755723375273314765549101796*q1^2 + 74.715924919304469530976219135624*q2^2
> >
> >
> > bcf4 =
> >
> > - 94.148317067276474944691156672796*q0^2 - 368.3753710396945456201963083999*q1^2 - 148.67610539578265233692702397997*q2^2
> >
> >
> > bcf5 =
> >
> > - 1379.3741023619048976608972517102*q0^2 - 5080.2611955523277736891954259558*q1^2 - 2055.5432573246058074068282558192*q2^2
> >
>
> Insert the expressions for bcf0,...,bcf5 and you'll see that the first matrix equation
> amatrix*acoeff-bmatrix*bcoeff=0
> is not satisfied.
>
> Best wishes
> Torsten.

If the equations you present above are really the equations you are trying to solve,
the only solution is
q0=q1=q2=0.
The reason is the following:
rows 1,3,4 and 6 of the matrix "amatrix" are identical.
Thus the corresponding right-hand sides must be equal.
Then you get e.g.
47.3*q0^2+42.3*q1^2+19.4*q2^2=1.69*q0^2+3.52*q1^2+1.47*q2^2
and so q0=q1=q2=0.

Best wishes
Torsten.

Subject: solving matrices of non liner third order type

From: Hari Kishore

Date: 15 May, 2013 11:56:07

Message: 11 of 13

"Torsten" wrote in message <kmvrri$rs2$1@newscl01ah.mathworks.com>...
> "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvqvc$pk9$1@newscl01ah.mathworks.com>...
> > "Torsten" wrote in message <kmvpo1$mgt$1@newscl01ah.mathworks.com>...
> > > "Torsten" wrote in message <kmvpek$lm7$1@newscl01ah.mathworks.com>...
> > > > "Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <kmvotp$kb6$1@newscl01ah.mathworks.com>...
> > > > > "Torsten" wrote in message <kmvm1t$d83$1@newscl01ah.mathworks.com>...
> > > > > > "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];
> > > > > > > > >
> > > > > > > > >
> > > > > mr.torsten
> > > > > actually there is no need of any guess for bcf.. bcfs's are to be find int terns of q0 q1 q2 fromfirst equation and substitute in second equation.. so final equtions would be.. 3 equations in 3 variables..
> > > > > > > > > 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.
> > > >
> > > > Why including such complicated things as inversion of ill-conditioned matrices ?
> > > > Solve in 9 instead of 3 unknowns - the result should come out the same (x(7)-x(9) should be the values for q0,q1 and q2).
> > > >
> > > > Best wishes
> > > > Torsten.
> > >
> > > As I notice now, your matrix "amatrix" does not have full rank - so writing bfc0,...,bfc5 in terms of q0,q1,q2 is _not_ possible.
> > >
> > > Best wishes
> > > Torsten.
> > > hi torsten
> > i got bcfs as
> > bcf0 =
> >
> > 2460.3445939155477396124188405012*q0^2 + 2005.1469061905712134056799285836*q1^2 + 933.87966673786928325461686686555*q2^2
> >
> >
> > bcf1 =
> >
> > - 1506.3730730764235989294514736715*q0^2 - 5894.0059366351127299282966853176*q1^2 - 2378.8176863325236133957826187853*q2^2
> >
> >
> > bcf2 =
> >
> > - 2041.7167782890462268040715539151*q0^2 + 2173.0522207347767936570916735661*q1^2 + 710.86523583882610199858733618617*q2^2
> >
> >
> > bcf3 =
> >
> > 105.52870667600759955941912217285*q0^2 + 175.4755723375273314765549101796*q1^2 + 74.715924919304469530976219135624*q2^2
> >
> >
> > bcf4 =
> >
> > - 94.148317067276474944691156672796*q0^2 - 368.3753710396945456201963083999*q1^2 - 148.67610539578265233692702397997*q2^2
> >
> >
> > bcf5 =
> >
> > - 1379.3741023619048976608972517102*q0^2 - 5080.2611955523277736891954259558*q1^2 - 2055.5432573246058074068282558192*q2^2
> >
>
> Insert the expressions for bcf0,...,bcf5 and you'll see that the first matrix equation
> amatrix*acoeff-bmatrix*bcoeff=0
> is not satisfied.
>
> Best wishes
> Torsten.

yeah you are right mr,torsten.. equations are not satisfied!! how can we proceed now?

Subject: solving matrices of non liner third order type

From: Hari Kishore

Date: 23 May, 2013 16:54:15

Message: 12 of 13

"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


hi mr. torsten i used fsolve and found the solution. unfortunately we dont have any initial guess for value .. initially i took -5 as guess i got set of values after solving equations. when i changed the initial guess as 50 i got different set of values as answer.. please suggest a methodme how to proceed!!!

Subject: solving matrices of non liner third order type

From: Torsten

Date: 24 May, 2013 06:30:28

Message: 13 of 13

"Hari Kishore " <harikishoreguptha@gmail.com> wrote in message <knlhjn$pma$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
>
>
> hi mr. torsten i used fsolve and found the solution. unfortunately we dont have any initial guess for value .. initially i took -5 as guess i got set of values after solving equations. when i changed the initial guess as 50 i got different set of values as answer.. please suggest a methodme how to proceed!!!

Didn't you read my final response ?
Unless you did not change your system of equations, q0=q1=q2=0 is the only solution.
No need to use fsolve.

Best wishes
Torsten.

Tags for this Thread

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.

Contact us