[SciPy-user] plot curve of a series of equations
Thu Apr 23 15:26:56 CDT 2009
Gary Ruben <gruben <at> bigpond.net.au> writes:
> Like this? This basically just what you said, so I'm not sure what your
> exact question is. Is it just the use of eval that you weren't clear on?
> import numpy as np
> import matplotlib.pyplot as plt
> eqs = [
> ['24 + 18.75*x + 4.79616e-013*x**2 + 31.25*x**3', 7.800, 7.600],
> ['28 + 22.5*x + 5.68434e-013*x**2 + 0*x**3', 8.000, 7.800],
> for i in eqs:
> xr = np.linspace(i, i, 10)
> x = xr - i
> y = eval(i)
> Gary R.
Yes that is what I am looking for. Sorry if I wasn't clear but maybe i didn't
have it clear in my head. Eval is new to me but also combing the upper limits,
lower limits and equations into the one variable is mcuh tidier than what I
had in mind. I was thinking of
for i in eqs:
but then struggling to get the approriate limits.
More information about the SciPy-user