I have a 1x10 1D vector A=1:10; and I want to convert it into a 5x2 2D vector
is there any function I can use like:
2dA = 1Dto2D(A,5,2);
and I get
2dA = [ 1 2 3 4 5
6 7 8 9 10]
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, you are looking for the
reshapefunction. It works exactly as you have described.