how to reorder matrix data?

조회 수: 4 (최근 30일)
ieng100
ieng100 2013년 9월 20일
I have a 65x6 matrix of coordinate data in the form:
x1 y1 x2 y2 x3 y3
x4 y4 x5 y5 x6 y6
xn yn....................
I wish to reorder this data into a matrix with all the x-values in the first column and all the y-values in the second column. Any help would be greatly appreciated, thank you!

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 9월 20일
편집: Azzi Abdelmalek 2013년 9월 20일
Example
a=[1 11 2 22 3 33;4 44 5 55 6 66;7 77 8 88 9 99]
out=reshape(a',2,[])'
  댓글 수: 1
ieng100
ieng100 2013년 9월 20일
Thank you Azzi!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by