I am trying to break down an array of the size 1x117031 (X array) to an array of size Nx140 (Y array) so I can plot the new array and find out how the plots changed during the cyclic tests (N to be around 1000).
Here is my code:
mydata=xlsread('average_4_5');
for i=100:size(mydata)
X(i-99)=mydata(i,10);
end
for j=1:1000
Y(j, 1:140)=X(1,((140*j)-140):140*j);
end
But I get an error:
Subscript indices must either be real positive integers or logicals.
It seems the problem is coming from the X(1,((140*j)-140):140*j)
and I don't have any idea why this doesn't recognise j
as being an integer value.
Any thoughts on how I can do this transformation and plot the rows of Y
to give me a graph with 1000 entries?