You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exercise:
Enter your best guess for v0. What is the error between the measured yT and your predicted y(T)? Hint: use our function, f_v, and plot the results.
I used basically the same code for rk2_step, but am getting the error "setting an array element with a sequence". I was able to do guess and check until the error was close to 0, but when I try to do the plot something is going wrong in my for loop.
The text was updated successfully, but these errors were encountered:
I am not sure if this has something to do with it, but I believe the num_sol_drag is a two-dimensional array and you are setting it with a one-dimensional statement in the for loop. I attempted to do a similar process of plotting the results and instead did it this way which seems to be a little simpler:
'''v0_examples = np.linspace(0,10,100)
error_in_v0 = np.zeros(100)
for i in range(0, len(error_in_v0)):
error_in_v0[i] = f_v(v0_examples[i])'''
Then, I plotted the sample v0 values versus their corresponding error and that helped me to make an educated guess.
Exercise:
Enter your best guess for v0. What is the error between the measured yT and your predicted y(T)? Hint: use our function, f_v, and plot the results.
I used basically the same code for rk2_step, but am getting the error "setting an array element with a sequence". I was able to do guess and check until the error was close to 0, but when I try to do the plot something is going wrong in my for loop.
The text was updated successfully, but these errors were encountered: