fsolve with 3 variable name

5 visualizaciones (últimos 30 días)
shahin hashemi
shahin hashemi el 29 de Nov. de 2017
Comentada: shahin hashemi el 29 de Nov. de 2017
dear all
i have 9 equations like below that equal to zero
i put them in matrix called F=[F(1);F(2);F(3);F(4);......;F(9)]
my variables are :
eb(2).....eb(4)
q(2).....q(4)
teta(2).....teta(4)
should i change my varible to X(1).......X(9) or i can use my default name and i have my Initial point
how should i use fsolve
F(1)= (3*cos(q(2))*sin(teta(2))*sin(teta(3)))/(100*teta(3)) - (3*cos(q(2))*(cos(teta(2)) - 1))/(100*teta(2)) + (3*cos(q(3))*(cos(teta(3)) - 1)*(sin(eb(2) - q(2))*sin(q(2)) - cos(q(2))*cos(teta(2))*cos(eb(2) - q(2))))/(100*teta(3)) + (3*sin(q(3))*(cos(teta(3)) - 1)*(sin(q(2))*cos(eb(2) - q(2)) + sin(eb(2) - q(2))*cos(q(2))*cos(teta(2))))/(100*teta(3))=0

Respuesta aceptada

Torsten
Torsten el 29 de Nov. de 2017
At the beginning of the function that "fsolve" calls, set
eb(2)=X(1);
eb(3)=X(2);
eb(4)=X(3);
q(2)=X(4);
q(3)=X(5);
q(4)=X(6);
teta(2)=X(7);
teta(3)=X(8);
teta(4)=X(9);
Doing so, you can continue working with your default names in the equations.
Best wishes
Torsten.

Más respuestas (0)

Categorías

Más información sobre Performance and Memory en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by