fsolve with 3 variable name
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
shahin hashemi
am 29 Nov. 2017
Kommentiert: shahin hashemi
am 29 Nov. 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
0 Kommentare
Akzeptierte Antwort
Torsten
am 29 Nov. 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.
Weitere Antworten (0)
Siehe auch
Kategorien
Find more on Systems of Nonlinear Equations 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!