convert a 3d matrix to 3 column vector

조회 수: 2 (최근 30일)
AAS
AAS 2020년 9월 17일
댓글: PS 2020년 9월 21일
Hi,
I have a matrix with x position as rows, y position as columns and magnitude as data at (x,y). How can I convert this to a 3 column matrix with (x,y, magnitude)
Thanks

답변 (1개)

AAS
AAS 2020년 9월 17일
Sorry,
I should rephrase my question. I have a matrix (magmatf- attached)- lets call the rows as R1 and columns and C1 . I created this using sub2ind and accumarray. Now I want to convert this back to a 3 column matrix with first two columns being the combinations of the (R1,C1)indices and the third column should be the value at R1(ind),C1(ind)
Thanks
  댓글 수: 1
PS
PS 2020년 9월 21일
Hi AAS,
Did you found the solution for it? I am also looking for something similar.
Thanks

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

카테고리

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