I’m trying to construct a vandermonde matrix using matlab.
My input vector is
t = [ 1 2 3 4 ]'
My output using the vander function is:
ans =
1 1 1 1
8 4 2 1
27 9 3 1
64 16 4 1
Now if I’m not mistaken the vandermonde matrix of the vector in question should be:
1 1 1 1
1 2 4 8
1 3 9 27
1 4 16 64
now I just realized that I can achieve my desired result using something like:
>> fliplr(vander(t))
ans =
1 1 1 1
1 2 4 8
1 3 9 27
1 4 16 64
Thanks.
Just flip the matrix (left/right) to get the one you want.