why write Module[{t, o, z}, f[t]]; on its own? what it means like this? code give error running. fix bug in code, not good to post code with coding error. bad for other people to waste time on it.
–
Robert HJul 13 '12 at 4:32

One of the problems is that you use Set (=) to define f[t]. This means that f[t] will be equal to the evaluated form of the right-hand side of its definition where o and z are replaced by their values as they were at the time that f was defined.

What you want is SetDelayed (:=) which leaves the right-hand side in its unevaluated form. In that case the right-hand side will be re-evaluated with the current values for o and z every time f is called.

The second issue is that to get a plot that is updated dynamically, you would need to do something Dynamic[Plot[f[t], ...]]. I don't have access to Mathematica at the moment but I suspect that since o and z don't appear explicitly in Plot[f[t],...] you would also need to set TrackedSymbols -> {o, z} in Dynamic[Plot[...]].

Mathematica is a registered trademark of Wolfram Research, Inc. While the mark is used herein with the limited permission of Wolfram Research, Stack Exchange and this site disclaim all affiliation therewith.