Solving equation using 'vpa' function
古いコメントを表示
I'm solving this eq: sin(x - 1.1556)+(sin(1.1556)*exp(-x/2.2683)) using vpa function but cannot solve, and below are my coding:

syms x;
x = solve(sin(x - 1.1556)+(sin(1.1556)*exp(-x/2.2683)));
vpa(x)
How can i solve this problem?
1 件のコメント
You can modify the code by assuming constraints on variable x as shown below
syms x;
assume(x >= 1.1556 & x < 5 )
warning('off')
sol = solve(sin(x - 1.1556)+(sin(1.1556)*exp(-x/2.2683)),x);
double(vpa(sol))
回答 (2 件)
syms x;
eqn = sin(x - 1.1556)+(sin(1.1556)*exp(-x/2.2683))==0;
solve(eqn,x)
vpasolve(eqn,x)
Dyuman Joshi
2023 年 5 月 17 日
編集済み: Dyuman Joshi
2023 年 5 月 17 日
The equation you have has multiple solutions, see plot below for reference.
If you want to return a particular solution, use vpasolve() with a specifc initial guess near that particular solution
syms x
eqn = sin(x - 1.1556)+(sin(1.1556)*exp(-x/2.2683));
fplot(eqn, [-5 25])
yline(0)
out = double(vpasolve(eqn == 0, x, 4))
コミュニティ
その他の回答 パワー エレクトロニクス コミュニティ
カテゴリ
ヘルプ センター および File Exchange で Formula Manipulation and Simplification についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
