emendes

395 Reputation

6 Badges

7 years, 185 days

MaplePrimes Activity


These are questions asked by emendes

Hello

I wonder if there is a function to retrieve only the monomials from a multivariable polynomial in x, y and z. Below is one such polynomail.

 

theta[2]*x3*x0-theta[8]*x2*x1*x0-theta[2]*x2*x1-theta[6]*theta[2]*x2*x0^2-theta[4]*theta[2]*x2*x0-theta[2]*theta[7]*theta[10]*x1*x0^3+theta[8]*theta[2]*theta[9]*x1*x0^2-theta[2]*theta[5]*theta[10]*x1*x0^2-theta[2]^2*theta[3]*theta[10]*x0^3+theta[6]*theta[2]^2*theta[9]*x0^3+theta[4]*theta[2]^2*theta[9]*x0^2

and the result

[x3*x0,x2*x1*x0,x2*x0^2,x2*x0,x1*x0^3,x1*x0^2,x0^3,x0^2]

Many thanks

 

Ed

 

Hello

It has been years since I last used maple so I apologize if my question makes no sense and my code is outdated (and wrong!).   

I need to write a function (proc) that uses a functional operator inside.  Something like

test:=proc()

local f,vars, func, aux, res;

f:=arg[1]; # a list

vars:=arg[2]: # a list

aux:=op(vars):

func:=aux -> f:  # a function from () to []

res:=func(op(func(aux))):

return(res):

end:

 

This is the basic idea of the proc.  If f:=[y, y*z-x, -15*x*y-x*z-x] and vars:=[x,y,z], the function of a function does not return as it supposes to.  Please tell me what I am doing wrong and how to improve and update the code.

 

many thanks

 

Ed

 

 

 

Hello

It has been years since I last run one of my packages (not mine actually) and consequently maple.  The package was written in Maple V and run on Maple V5.  I have used updtscr to convert the old code and not many messages came out.   The updated code does not run unfortunately.  One of the problems is the following command:

linalg[dotprod](f,map((a,b) -> diff(b,a),vars,h));

Although linalg is deprecated, that does not seem to be the problem.   Suppose h, f (vector) and vars are:

The output is:

How to avoid the conjugate? Is there a simpler way to do that?

Many thanks for your patience and help.

Regards

 

Ed

First 11 12 13 Page 13 of 13