I have a code that looks like:
for ii=2:length(dep); dz(ii) = dep(ii)-dep(ii-1); drho(ii) = sigth(ii)-sigth(ii-1); endfor ii=1:length(dz); drhodz(ii) = drho(ii)/dz(ii); endmax(drhodz)
Is there a way to go back and then see which ii this maximum answer corresponds to? (Does that question make sense? After finding the maximum drhodz I'm trying to work backwards to see at which dz (change in depth) this max occurs.)
Best Answer