三次方程式の解で結果の意味が分かりません
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
kenichiro inagaki
le 11 Oct 2021
Commenté : kenichiro inagaki
le 11 Oct 2021
三次方程式の解が知りたいのですが、下記のような値しか出てきません。ヘルプで調べても意味のわからないことばかり書いてあって困ってます。
素人にわかるように説明いただけないでしょうか。お願いいたします。zの意味が出てきません。
>> syms x ;
>> eqn = -0.00302 * x^3 + x - 0.3828==0;
>> S = solve(eqn,x)
S =
root(z^3 - (50000*z)/151 + 19140/151, z, 1)
root(z^3 - (50000*z)/151 + 19140/151, z, 2)
root(z^3 - (50000*z)/151 + 19140/151, z, 3)
0 commentaires
Réponse acceptée
Atsushi Ueno
le 11 Oct 2021
高階数多項方程式の求解で説明している「陽的な解」が今求めている内容です。取り合えず結果のみ書きます。
syms x ;
S = solve(-0.00302 * x^3 + x - 0.3828==0, x); % 'MaxDegree'のデフォルト値は2
S = solve(-0.00302 * x^3 + x - 0.3828==0, x, 'MaxDegree', 3) % こう書けば陽的な解を解いてくれます
2 commentaires
Atsushi Ueno
le 11 Oct 2021
数値解を出す場合はsolveではなくvpasolveを使います。
syms x ;
S = vpasolve(-0.00302 * x^3 + x - 0.3828==0, x)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 方程式の解法 dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!