フィルターのクリア

how do I solve a non linear function

1 回表示 (過去 30 日間)
sumaiya hossain
sumaiya hossain 2022 年 8 月 4 日
編集済み: Torsten 2022 年 8 月 5 日
Hi I am trying to solve this function but I keep on getting a warning sign I am unsure to howto put solve for a non liner function
syms t
y = 4*sin(2*pi*t) + exp(-t)./t
y = 
eqn = y -- 0
eqn = 
solv =solve(eqn,t)
Warning: Unable to solve symbolically. Returning a numeric solution using vpasolve.
solv = 
98.5
figure
fplot(y,[-3 10])
grid
  3 件のコメント
sumaiya hossain
sumaiya hossain 2022 年 8 月 4 日
Thank you so much. The vpasolve instead of solve worked! :)
Torsten
Torsten 2022 年 8 月 5 日
編集済み: Torsten 2022 年 8 月 5 日
You can restrict the search for a solution to a specific interval, e.g.
syms t
y = 4*sin(2*pi*t) + exp(-t)./t;
eqn = y == 0;
solv =vpasolve(eqn,t,[0,1])
solv = 
0.54308725386344674331298509227806
solv =vpasolve(eqn,t,[1,2])
solv = 
1.505862532193485343436982696241
figure
fplot(y,[0.1 2])
grid

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by