Hi all, I have a matrix A = [2 3 7 13 24] and I want to form a loop: output = 0 for i=1:somehing! output = output+i also for specific numbers of i(for example for all odd i's) I want to have two outputs, one of them should be zero and the other one is the regular output of the loop for that i. how can I do this and I also want the loop to go through all the elements of A?