MATLAB: Convert 262144×1 into 1×262144. reshapevector I have the following: 256×1 double, I want to convert it into 1×256 double. How it will be done? for example if we have 5×1 double: 12 23 34 56 134 Now convert it into like this: 12 23 34 56 134 Best Answer If A is your array..just transpose it. iwant = A'Read about transpose. Related SolutionsMATLAB: How to change a 3 dimensional matrix to 2 dimensinal If A is your matrix, you can usesqueeze(A) MATLAB: How can convert vector aa size 1×262144 to matrix 256×256 % you will not convert (262144 is 4 times 256*256 and not equal to it)% but complete 4 matrices out of your "aa" vector % and you will get a "M" array:L=256*256;M=nan(256,256,4); % pre-allocatefor i=1:4 v=aa(L*(i-1)+1:L*i); M(:,:,i)=reshape(v,256,256);end Related QuestionI want to convert matrix into vectorWhen I add two floating point numbers the result is not correct above 262144Transposing 5x5x5 matrixReshape matrix (Special case)
Best Answer