function retval = coef2proj(Template,Soln)
% usage: G = coef2proj(Template,Soln)
% description: generates a projection matrix from tensored
% matrix generated by proj2coef and inserts entries of Soln.
% No error checking so get the inputs right!

Ptmp = vec(Template);
ndx = find(Ptmp>0);
Ptmp(ndx) = Soln;
[m,n] = size(Template);
retval = reshape(Ptmp,m,n);


