Why if we want to build the square matrix $A$ having in the j-th column the ordinates $y_i^j$ in the y5 vector, we have to elevate every column as it follow:
y5 = [-0.0822 -0.2888 -1.3464 -0.8785 1.0000];
A = [y5' (y5').^2 (y5').^3 (y5').^4 (y5').^5];
This is done because it is the simplest method to visually see what is happening. The following code is much less efficient, but will achieve the same result.
In the temporary matrices,
idxMathas the vector[1,2,3,4,5]repeated in every row andy5mathas they5vector repeated in every column.