MATLAB Answers


reshape function row wise

Asked by Carolina
on 15 Nov 2012

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!!




No products are associated with this question.

1 Answer

Answer by Matt Fig
on 15 Nov 2012
Edited by Matt Fig
on 15 Nov 2012

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).'  % Also try with 4,3 instead of 3,4

  1 Comment

Hi Matt: It's ok the answer you give me!!! thank you!!



Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!