I have three lists of numbers:
a= {2,3,4,5,6}
b = {4,5,7,2,1}
c= {9,6,4,6,2}
I would like to take the minimum of each index from the 3 lists and turn that into a list, say d. so d = {2,3,4,2,1}.
the loop i have started is:
minsl = {};
for(i = 1, i = 6, i++,
mins = {a[i], b[i], c[i]};
minval = minimum(mins);
minsl=insert into(minsl,minval,i);
If(n items(minsl)==5, break()); // this line was added to stop the loop because it gets stuck
);
the output is minsl = {1,1,1,1,1} i.e. is gets stuck storing the last entry in the list only (and foes on forever without the break line), when it should be {2,3,4,2,1}
Any suggestions how to fix?? Thanks!!