1

I am trying to verify that a system of equations has a non empty set of solutions in Matlab. I know that this can be done by computing the Groebner base, and if that is equal to one then the system has an empty solution set. Can I do this in Matlab and how?

1 Answers1

2

You have to build a vector with the set of polynomials. This must be a string of the form

 f1 , f2, ..., fn 

where f1, f2, ..., fn are the polynomias , e.g. f1=x^2-1, f2=y*x^3-x-2 . This MUST be a string. You can construct it from an cell array of polynomials e.g. polyCell={f1, f2, ..., fn} with

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

Then you should make a call to the appropriate function in Mupad with

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

or to evaluate with lexicographic order :

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

That's it. You may want to use Mupad directly, as well, but I'll let you check the documentation.

  • 1
    This is executed in mupad? but I don't have it installed. –  Mar 18 '12 at 14:40
  • Mupad is the default symbolic engine in Matlab, it is installed with Matlab. –  Mar 18 '12 at 14:41
  • but how do you define the order of variables, e.g. x>y>z. And/or how can the `feval` function be used? – Tanasis Apr 21 '17 at 18:23