I’m just starting out with octave and I’m trying to write a for loop which would break up a cell array into new cell arrays and give each a unique, sequential identifier based on the entry values.
For example, if the first 10 entries are 0, I would want the loop to make a cell array 10 cells long with a title something like List_0.
This is what I’ve got so far:
startVariable = trackId{1}
new = []
for i = 1:length(trackId)
if startVariable == trackId{i}
new = [new, {trackId{i}}]
elseif
startVariable != trackId{i}
break
endif
endfor
I’ve started out with a for loop that chunks up the first part of my array, but I have no idea how to assign a unique identifier to each chunk or how to keep moving through the array based on a new value.