function [P,x] = createP(N)

h = 1/N;
x = (0:h:1)';
%for j = 1:N-1
%    for k = 1:N-1
%        P(k,j) = sin(k*j*pi*h);
%    end 
%end
ind = (1:N-1)';
P = sin(ind*ind'*(pi*h));
P = sqrt(2/N)*P;

