Solving non linear equation

조회 수: 1 (최근 30일)
Shahzaib Gul
Shahzaib Gul 2020년 10월 2일
답변: Alan Stevens 2020년 10월 2일
I want to calculate the value of x1 from that equation..So this is one equation and one unknown in it..As it contains theeta so therefore it is a non linear equation..So i have used fsolve for that and it has also calculated the result but the thing is result is not correct....the value of x1 should be 0.16 or closer than that..But i have got 0.0315 so i dont know which mistake i am making...Can anyone help please?
  댓글 수: 3
Shahzaib Gul
Shahzaib Gul 2020년 10월 2일
function F=myfun(x)
F=[(0.23544*cos(0))+(0.23544*cos(180))+(0.23544*cos(180))+(1.4715*x(1)*cos(0))];
end
Shahzaib Gul
Shahzaib Gul 2020년 10월 2일
Yes sir this is the required code...Please looking for help

댓글을 달려면 로그인하십시오.

답변 (1개)

Alan Stevens
Alan Stevens 2020년 10월 2일
Use cosd instead of cos. cosd assumes the argument is in degrees, cos assumes the argument is in radians.

카테고리

Help CenterFile Exchange에서 Mathematics and Optimization에 대해 자세히 알아보기

제품


릴리스

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by