fsolve with 3 variable name
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Torsten
2017-11-29
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!