monolist

monolist(/command/monolist) is used to generate all monomials up to a specified degree.

Syntax

v = monolist(x,d)

Examples

Create all monomials of degree less than 2

sdpvar x y
v = monolist([x y],2);
sdisplay(v')

ans =
  '1'   'x'   'y'   'x^2'   'x*y'   'y^2'

The command supports different degrees on different variables

sdpvar x y
v = monolist([x y],[2 3]);
sdisplay(v')

ans =
  '1'   'x'   'y'   'x^2'   'x*y'   'y^2'   'x^2*y'   'x*y^2'   'y^3'