Breaking up a long variable into more rows and less columns

1 view (last 30 days)
After running some calculations I get a variable of 1x18144 values. Is there anyway I can break them up into 144 rows so each row will have 126 values.
So that values 1 till 126 take row 1 and values 127 till 254 takes row 2 and so on. Thanks!

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 28 Dec 2013
out = reshape(1:18144,126,[])';

More Answers (0)

Categories

Find more on Matrices and Arrays in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!