Hi. Please can anyone help me with this? I have a column vector which contains 30561 rows (fluorescene data). The order of this vector is 501 values corresponding to emmision values every 61 excitation values. I want to reshape it but in a row-wise manner, how do I do it?
Thanks in advance!!
Carolina

 채택된 답변

Matt Fig
Matt Fig 2012년 11월 15일
편집: Matt Fig 2012년 11월 15일

1 개 추천

Since you don't give a small example of input and expected output (always a bad practice when asking for help!!), I will guess that one of these will give you what you need:
A = (1:12).'; % A column vector
reshape(A,3,4)
reshape(A,3,4).' % Also try with 4,3 instead of 3,4

댓글 수: 2

Carolina
Carolina 2012년 11월 16일
Hi Matt: It's ok the answer you give me!!! thank you!!
Regards
Carolina
Kurt Feigl
Kurt Feigl 2021년 9월 30일
The third line of Matt's code is what I found to be helpful. Here is a simpler example, making the transpose more explicit:
A=[1,2,3,4,5,6]
A =
1 2 3 4 5 6
transpose(reshape(A,3,2))
ans =
1 2 3
4 5 6

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2012년 11월 15일

댓글:

2021년 9월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by