30x-11= 30/x

2 ビュー (過去 30 日間)
Alex Sabu
Alex Sabu 2020 年 10 月 7 日
編集済み: Stephen23 2020 年 10 月 7 日
30x-11= 30/x

回答 (2 件)

Ameer Hamza
Ameer Hamza 2020 年 10 月 7 日
If you want to solve this equation for x, then you have the following two methods to do it in MATLAB.
1) If you have symbolic toolbox
syms x
eq = 30*x-11 == 30/x;
sol = solve(eq);
2) Your equation is a polynomial (for ). You can use roots()
% polynomial is 30x^2-11x-30=0
cf = [30 -11 -30];
sol = roots(cf);

Stephen23
Stephen23 2020 年 10 月 7 日
編集済み: Stephen23 2020 年 10 月 7 日
Simple numeric solution:
>> fun = @(x) 30*x - 11 - 30./x;
>> x = fzero(fun,pi)
x =
1.2000
Checking:
>> 30*x-11
ans =
25
>> 30/x
ans =
25

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by