
function Phi = basisPoly(X, order)

powers = [0:order];
X = X(:);
N = length(X);
M = length(powers);
Phi = zeros(N,M);

for ii = 1:M
  Phi(:,ii) = X .^ powers(ii);
end

