Good evening, everyone,
I want to achieve something like this in a 2D-array:
1 0 0 0 0
0 0 1 0 0
0 0 0 1 0
0 1 0 0 0
0 0 0 0 1
What I have now is a nested DO LOOP with an awful amount of IFs and ELSEIFs like:
DO icoun=1,ncols
DO jcoun=1,nrows
IF((icoun==3.AND.jcoun==1) &
& .OR.(icoun==4.AND.jcoun==2)...) THEN
...
END IF
END DO
END DO
Is there an easier way to achieve this?