Hi,

Given an integer N >= 0 and a m-by-n matrix X. Denote Xj the j-th column of 
X.

How would you form the following matrix expression in Julia?

result[:,j] = 
[
1                # order 0 term

Xj[1]           # order 1 terms
Xj[2]
Xj[3]
.
.
.
Xj[m]

Xj[1]^2       # order 2 terms
Xj[2]^2
.
.
.
Xj[m]^2
Xj[1]*Xj[2]
Xj[1]*Xj[3]
Xj[2]*Xj[3]
.
.
.
Xj[m-1]*Xj[m]
.
.
.
Xj[1]*...*Xj[m] # order N terms
]

I'm trying to get something similar to the Vandermonde matrix 
(http://en.wikipedia.org/wiki/Vandermonde_matrix), but with additional 
mixed terms. I know Julia has some nice features for expression generation, 
can someone guide me through it?

Regards,
Júlio.

Reply via email to