I want to plot of o vs t0 after I have written the following:
N = 100
t=0.0
m = [0.0, pi/2, 0.0]
o=[0 for j in range(0,N)]
p=[0 for j in range(0,N)]
for j in range(0,N):
(t,theta) = runkut(2, t, m, 1.0/N)
o[j] = m[1]
p[j] = m[2]
t0 = linspace(-3*pi,3*pi,50)
plt.plot(t0,p)
I am not sure how can I plot a graph with (t0) values with the new o values after the for loop.
I got the following error:
x and y must have same first dimension, but have shapes (50,) and (1000,)
Thanks