Output Answer by solve

3 次查看(过去 30 天)
Farshid R
Farshid R 2022-6-1
Hello
In the output the values give this result. I want to get the values:
syms X1 X2 X3 X4
eq=[X1^2+X2^2==1949.947, (X1*X3)+(X2*X4)==-28.338, eq3=(X3*X1)+(X4*X2)==-28.338, eq4=X3^2=X4^2-81.892]
[x1,x2,x3,x4]=solve([eq],[X1,X2,X3,X4])
x1 =
Empty sym: 0-by-1
x2 =
Empty sym: 0-by-1
x3 =
Empty sym: 0-by-1
x4 =
Empty sym: 0-by-1
Thank you for helping me
  5 个评论
Farshid R
Farshid R 2022-6-1
Thank you so much.
Walter Roberson
Walter Roberson 2022-6-1
编辑:Walter Roberson 2022-6-1
Your second and third equations are the same. There would not be a unique solution .

请先登录,再进行评论。

回答(1 个)

KSSV
KSSV 2022-6-1
syms X1 X2 X3 X4
eq1 = X1^2+X2^2==1949.947 ;
eq2 = (X1*X3)+(X2*X4)==-28.338;
eq3 = (X3*X1)+(X4*X2)==-28.338;
eq4 = X3^2==X4^2-81.892 ;
eqs = [eq1, eq2, eq3, eq4] ;
s=solve(eqs,[X1,X2,X3,X4]) ;
s.X1
ans = 
s.X2
ans = 
  5 个评论
KSSV
KSSV 2022-6-1
Read the documentation up there. The problem is due to version.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by