matlab怎么求解有符号变量的方程组

2025-04-07 00:29:49
推荐回答(1个)
回答1:

有符号变量时,要用数学符号运算工具箱,先用syms 定义变量,再用solve解方程。如:
syms x
x=solve(x^2-5*x+2==0)
结果是:
x =
5/2 - 17^(1/2)/2
17^(1/2)/2 + 5/2