如何在Matlab中计算方程组的Groebner Base

时间:2012-03-18 14:30:48

标签: matlab

我试图验证方程组在Matlab中有一组非空的解。我知道这可以通过计算Groebner基础来完成,如果它等于1,那么系统有一个空的解决方案集。我可以在Matlab中做到这一点吗?

1 个答案:

答案 0 :(得分:2)

您必须使用多项式集构建向量。这必须是

形式的字符串
 f1 , f2, ..., fn 

其中f1, f2, ..., fn是多项式,例如f1=x^2-1f2=y*x^3-x-2。这必须是一个字符串。您可以从多项式的单元格数组构建它,例如polyCell={f1, f2, ..., fn}

polyRing = strcat(polyCell{:});
polyRing(end)=[];

然后你应该使用

调用 Mupad 中的相应功能
groebnerBasis=evalin(symengine,['groebner::gbasis([' polyRing '])']);

或用词典顺序评估:

groebnerBasis=evalin(symengine,['groebner::gbasis([' polyRing '],LexOrder)']);

就是这样。您可能也想直接使用Mupad,但我会让您查看文档。

相关问题