Breaking up a long variable into more rows and less columns

2 views (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)

Products

Community Treasure Hunt

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

Start Hunting!