Question: Loop over a set of lists

Hi there,

I would like to have the Jacobian matrix of an ODE system evaluated, and their eigenvalues computed, at the steady states of the system.

I know how to get the Jacobian matrix evaluated and the eigenvalues computed on an individual basis, setting manually each steady state as the argument of the matrix.

However, I would like to have it in a loop, so that the loop manages all steady states, that is:

steadyStates:= solve(mySystem); # would yield a set of pairs/lists

for each steadyState

m:=Jacobian(steadyStateN); # evaluate the Jacobian matrix

ev:= eigenvals(m); # compute the eigenvalues and save them to another variable/array and print them

end for:

First, I am not to find a way to loop over my steadyStates.

Attached is an example where the Jacobian matrix and eigenvalues are computed individually, where the steady states have been hard-coded once they have been computed: MaplePrimes_Predator_prey_model_Jacobian.mw

 

Any ideas on how to do this?

Thanks,

jon

 

 

Please Wait...