Hi
I have one array "A" with N values and another one "B" with also N values. The values in "B" are a flag (let's say YES or NO) to decide if a certain position n, 1<n<N has to be written twice in a third array "C" of dimension M>N
Something like this:
DO n=1,N m=1,M
IF B = NO then
C(m) = A
IF B = YES then
C(m) = A
C(m+1) = A
My problem is that i don't know where to include the counter "m" and how to make it advance "1" when "n" advances to the next iteration in the first IF case and "2" in the second IF case.
Probably there is a better way to do this, but i am not being able of figuring it out.
Any advise?
Thank you very much
I have one array "A" with N values and another one "B" with also N values. The values in "B" are a flag (let's say YES or NO) to decide if a certain position n, 1<n<N has to be written twice in a third array "C" of dimension M>N
Something like this:
DO n=1,N m=1,M
IF B = NO then
C(m) = A
IF B = YES then
C(m) = A
C(m+1) = A
My problem is that i don't know where to include the counter "m" and how to make it advance "1" when "n" advances to the next iteration in the first IF case and "2" in the second IF case.
Probably there is a better way to do this, but i am not being able of figuring it out.
Any advise?
Thank you very much