Question: is it possible to access the current iteration index and place it in the differential equation when using dsolve?

Consider the following system of differential equations

sys := diff(y(x), x) = z(x)*f1(i), diff(z(x), x) = y(x)*f2(i)

where f1 and f2 are functions that depend on the current iteration. Ultimately, I'd like to index into an array that has the length of the number of iterations, to obtain a value that will be part of the differential equations. It's an array of random numbers, but I'd rather not have to generate them on the fly while dsolve is working.

I've been investigating the use of Events for this, but the documentation is quite atrocious and outdated (and I only know this because, for example, when I try to use certain arguments to dsolve some error messages show that the arguments have changed name)

Please Wait...