fsolve with 3 variable name

조회 수: 6 (최근 30일)
shahin hashemi
shahin hashemi 2017년 11월 29일
댓글: shahin hashemi 2017년 11월 29일
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

채택된 답변

Torsten
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 CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by