Question: lists or functions?

Hello,

I have a program where a system of DE's is solved numerically then some calculations are done to the result..

let the solution of the DE's be y(t) then we have:

A(t) = some function of y(t)

B(t) = some function of A(t)

C(t) = some function of B(t)

Those A, B and C are actually complicated formulas including sums, matrices... etc. So it's not possible to combine them in one function.

Then we'll plot C for a specific period of time.

 

My questions:

Is it better/faster to keep A, B and C as functions that can be calculated later at any time (and use plot at the end) or to define each as a list and evaluate them at each needed time (and use listplot at the end)?

 

Thank you

Please Wait...