Previous Page Next Page Contents

Type::PolyExpr -- type for testing polynomial expressions

Introduction

With Type::PolyExpr, polynomial expressions can be identified.

Call(s)

testtype(obj, Type::PolyExpr(unknowns <, coeff_type>))

Parameters

obj - any MuPAD object
unknowns - an indeterminate or a list of indeterminates
coeff_type - the type of the coefficients; a type can be an object of the library Type or one of the possible return values of domtype and type

Returns

see testtype

Related Functions

testtype, Type::PolyOf, poly, indets

Details

Example 1

Is the object a polynomial expression with variable x?

>> X := -x^2 - x + 3:
   testtype(X, Type::PolyExpr(x))
                                   TRUE

But X is not a MuPAD polynomial in x:

>> testtype(X, Type::PolyOf(x))
                                   FALSE

Is the object a polynomial expression with variables x and y and with integer coefficients?

>> X := -x^2 - x + 3:
   testtype(X, Type::PolyExpr([x, y], Type::Integer))
                                   TRUE

The next example too?

>> X := -x^2 - y^2 + 3*x + 3*y - 1:
   testtype(X, Type::PolyExpr([x, y], Type::Integer))
                                   TRUE
>> delete X:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000