Okay, so I'm trying to plot these two equations that are supposed to give me a range of curves with varying values for both of them.
What I want to do is plot y = c1 * (1.05^k) + c2 * (0.55^k) * 5, vs y = c1 * (1.05^k) * 1.3 + c2 * (0.55^k) for different values of c1 and c2. k is a value for the time, so I think k should also follow a range.
I've added my code, and I know where my problem is coming from (appending the lists basically), but can someone explain a simple way I can make it work otherwise and plot separate curves instead? Can I have the values of Y1 and Y2 be stored in a 2d array and work with that? Or should I make a function? (I tried making a function first but it wasn't working at all, so I sort of deleted that). But yeah, any suggestions or help on how to do this would be appreciated!
y1 = []
y2 = []
plt.figure(figsize= (16,10))
for c1 in range (-10, 10, 2):
for c2 in range (-10, 10, 2):
for k in range (0, 50):
Y1 = c1*1.05**k + c2*(0.55**k)*5
y1.append(Y1)
Y2 = c1*(1.05**k)*1.3 + c2*(0.55**k)
y2.append(Y2)
plt.plot(y1, y2)
y1andy2. If you want separate curves, plot separate listsplotstatements in the second code sample in the question are inside the loop