MATLAB: Forming matrix using vector matrix Hi, i need to form a matrix using this vector a=[ 1 2 3 5 6 7 8 9 2 1 2], the matrix elements be A=[1 2 3 4 5 6; 7 8 9 2 1 2] i used reshape command but it doesn't give me the sequence i want. Best Answer a=[ 1 2 3 4 5 6 7 8 9 2 1 2]; reshape(a,6,2)' Related SolutionsMATLAB: Find the pair of the matrix Maybe you ask for this: D = reshape([a.' circshift(a.',-1)], [], 2); D(size(a,2):size(a,2):end,:)=[]; out =[D fliplr(D)] MATLAB: How to convert a vector to a matrix in Matlab a=[1 2 3 4 5 6 7 8 9]reshape(a,3,3) Related QuestionHow to fit a series of datapoints using 3 piecewise linear fit linesOpposite of :How to copy rows of a matrix to convert it into single row?How do i manipulate matrix in form given below?
Best Answer