Solving non linear equation

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 件のコメント

John D'Errico
John D'Errico 2020 年 10 月 2 日
Please don't post a picture of code. A picture is useless, because we cannot copy and paste a picture of code into MATLAB. That forces someone who might otherwise be willing and able to help you, to retype your code without error.
WHY WOULD YOU WANT TO MAKE IT MORE DIFFICULT FOR SOMEONE TO HELP YOU?
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 日

0 投票

Use cosd instead of cos. cosd assumes the argument is in degrees, cos assumes the argument is in radians.

カテゴリ

ヘルプ センター および File ExchangeMathematics and Optimization についてさらに検索

製品

リリース

R2015b

質問済み:

2020 年 10 月 2 日

回答済み:

2020 年 10 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by