Closed baggepinnen closed 1 year ago
What are you trying to achieve with monomials(x, [2,2])
? Why don't you do monomials(x, [2])
?
I would like to be able to create all monomials where x[i]
appear up to order deg[i]
similar to what monomials(x, [3,2])
does. The problem is that for some choices of deg
, I get the error above
monomials(x, [3,2])
gives you all monomials of degree 3
followed by all monomials of degree 2
. Note that you have x[2]^3
in the output.
I think I misunderstood how the degree argument worked, I managed to get what I wanted by using the filter function, thanks for your help :)
Below,
monomials(x, [3,2])
works, butmonomials(x, [2,2])
errors. Why?