I have a 3×1536 matrix named time
On the 2nd row I'm trying to fill it in with hours of the day but I need four of each hour so for example:
1 1 1 1 2 2 2 2 3 3 3 3…24 24 24 24 1 1 1 1 2 2 2 2 and so on
.
I have no idea how to go about indexing the matrix in a way that I don't have to write then modify 96 loops/indexing lines of code because I have to fill it out in the only way I can think of right now which is:
for a=1:96:1536 time(2,a)=0;end.for b=2:96:1536 time(2,b)=0;end...for e=5:96:1536 time(2,e)=1;end
Best Answer