How to change array to be a special matrix ..??

Let's try with me to solve this problem.
How to change array like example below
Ar2Mat = [ 2 0.5 6 7.3 15 5.6 4 3.3 12 8.2 ]
into
Ar2Mat = [ 2 0.5
6 7.3
15 5.6
4 3.3
12 8.2]
i've already tried and just make the matrix like this
Ar2Mat = [ 2 5.6
0.5 4
6 3.3
7.3 12
15 8.2]
Does anyone has the solution..?
thanks

 Accepted Answer

José-Luis
José-Luis on 29 Jan 2013
Edited: José-Luis on 29 Jan 2013
Ar2Mat = [ 2 0.5 6 7.3 15 5.6 4 3.3 12 8.2 ];
Ar2Mat = reshape(Ar2Mat,2,5)'
Are you taking the same course as Vishnu?

1 Comment

No, I don't taking the same course as Vishnu And thanks for your answer.. :)

Sign in to comment.

More Answers (0)

Categories

Asked:

on 29 Jan 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!