Forming a matrix



Right now I have section of code for creating a matrix,
U(MxN) from a vector A, (M*N in length):

k=1;
i=1;
while(i<ylength)
j=1;
while(j<xlength)
U(i,j) = A(k);
j=j+1;
k=k+1;
end
i=i+1;
end

Is there a shorter way to do this other than writing a separate
function file? I searched the help but couldn't determine a solution.
It just seems cumbersome.

Dan
.



Relevant Pages