how solve x on x+sin(x+y)=y

22 ビュー (過去 30 日間)
Tunca Mehmet
Tunca Mehmet 2018 年 5 月 24 日
コメント済み: Tunca Mehmet 2018 年 5 月 24 日
hi guys,i'm new and my question is : solve x+sin(x+y)=y for y=0.5 and after that plot the equation for y(-4:0.1:4). it didn't work went i do this
y=(-4:0.1:4);
x=sqrt(((y.^2)/sin(y.^2)*cos(y.^2))-1);
plot(x,y)
thank you for your help

回答 (1 件)

Torsten
Torsten 2018 年 5 月 24 日
y=-4:0.1:4;
for i=1:numel(y)
y_actual=y(i);
x(i)=fzero(@(x)x+sin(x+y_actual)-y_actual,1);
end
plot(x,y)
Best wishes
Torsten.
  1 件のコメント
Tunca Mehmet
Tunca Mehmet 2018 年 5 月 24 日
i thing is good, thank you.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by