Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Mathematica 提供 MonomialList[f] 来获取 f 中的所有单项式:
MonomialList[(x+y)^2]={x^2,2xy,y^2}
但是我需要的是{x^2,xy,y^2},我该怎么做呢?
Inner[#2^#1 &, First/@CoefficientRules[#1, #2], #2, Times] &[(x + y)^2, {x, y}] (* {x^2, x y, y^2} *)