I'm trying to write Fortran 95 code to mimic what I did in MATLAB but I'm struggling to access the array indices. code is much more complex than what is shown below, but this is the gist. I'd prefer to avoid do loops.
e.g. --> Matlab commands. Assume a,b,c are same size.
indx=find(a<0); % find all negative values of "a"
b(indx)=30.; % set those same elements in different array "b" to 30.
c(indx)=b(indx)./a(indx)
etc.
etc.
How can I store and use those indices from "a" array and operate on the same indices from other arrays in fortran?