I am trying to run a for loop in Julia using bounds for integration where fI and r are arrays of the same length. I know this is incorrect, but this is the gist of what I want to do.
a = zeros(1:length(fI))
for i = 1:length(fI)
a[i] = (fI[i+1] - fI[i])/(r[i+1] - r[i])
end
How can I set increments of n+1 in Julia? Haven't had any luck finding the answer elsewhere.
Just let me know if I can clarify anything. I'm still pretty new to the language.