Nested for loop troubles
2 visualizzazioni (ultimi 30 giorni)
I am having difficulty troubleshooting a nested for loop. Things work fine on the first pass (when i=49) but break down on the second pass (when i=50). More specifically, instead of appending to consolFut1 on the second pass, it overwrites the data from the first pass. Can anyone spot the error? Thanks for reading.
for i = 49:52
for j = [1; 18; 43; 63]
tifCls1 = tifCls(j:exp);
for k = [1112; 1129; 1154; 1174]
Image Analyst il 29 Giu 2015
Nothing on the left hand side of your equations takes an index, so they all get overwritten at each iteration. Add an index if you want to store the different values.
exp is a built in function. Don't use it as the name of a variable!