MATLAB: 1, 4, 7, 2, 5, 8, 3, 6, 9 serie

matlab serie

Hi, at some point in my MATLAB code I need to generate the following serie of numbers 1,4,7, 2, 5, 8, 3, 6, 9 I can't find the way to please can you help me ?
Thank you !

Best Answer

a = reshape(1:9,3,3)';
a = a(:)'
Related Question