how to declare variable as constant without defining its value

7 ビュー (過去 30 日間)
Twinkle Goyal
Twinkle Goyal 2021 年 9 月 29 日
編集済み: Matt J 2021 年 9 月 29 日
suppose u have two polynomial equations - (a*x^3+b*x^2+c*x+d , a*x^2+b*x+c) and u want to find common roots for the two equations . here u need to find roots in form of a , b , c ,d
CODE
syms x
gcd(a*x^3+b*x^2+c*x+d , a*x^2+b*x+c)

回答 (1 件)

Matt J
Matt J 2021 年 9 月 29 日
編集済み: Matt J 2021 年 9 月 29 日
It seems clear that they will only ever have common roots if d=0, in which case the common roots will be,
syms x a b c
solve(a*x^2+b*x+c==0)
ans = 

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by