如何解决求解具有自由度的符号方程组
我正在尝试解决具有自由度的符号系统。 它假设使用参数,但它无法处理一些简单的事情,例如:
syms x1 x2 x3 x4 x5 x6 x7 x8 real
con = [
x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8 == 1080
x2 + x3 == 0
x6 + x7 == 0
];
s = solve(con,'ReturnConditions',1,'PrincipalValue',true)
输出:
Warning: Unable to find explicit solution. For options,see help.
> In solve (line 317)
In testm (line 10)
In run (line 91)
s =
struct with fields:
x1: [0×1 sym]
x2: [0×1 sym]
x3: [0×1 sym]
parameters: [1×0 sym]
conditions: [0×1 sym]
Lucien 的解决方案也适用于此:
Solving a symbolic equation with integer variables
解决方法
也许可以帮到你。
s = solve(con,[x1 x2 x3 x4 x5 x6 x7 x8],'ReturnConditions',1,'PrincipalValue',true);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。