Is there a way to code in a different way instead of repeating it for that many times? Below are an example of my code. y is an array 20 x 10000. I will need to do data analysis individually later, e.g. X1 for data analysis, X2, X3, etc. Thank you.
segLength = 10X1 = reshape(y(1,:),segLength, [])';X2 = reshape(y(2,:),segLength, [])';X3 = reshape(y(3,:),segLength, [])';X4 = reshape(y(4,:),segLength, [])';X5 = reshape(y(5,:),segLength, [])';% X6......X19
X20 = reshape(y(20,:),segLength, [])';
Best Answer