A collaborative educational initiative in computational science and engineering.
mesnardo on master
Minor changes * [Module 2, Les… (compare)
labarba on format
t = numpy.linspace(0.0, T, N+1)
In a local group discussion today, we found another correction to module 01_02. The Euler's method loop. Currently, the loop reads:
z[0]=z0
# time-loop using Euler's method
for n in range(N):
u = u + dt*numpy.array([u[1], g*(1-u[0]/zt)])
z[n] = u[0]
But this overwrites z[0] with non-initial data.
Loop should read
z[0]=z0
# time-loop using Euler's method
for n in range(1,N):
u = u + dt*numpy.array([u[1], g*(1-u[0]/zt)])
z[n] = u[0]
I will create another pull request. Thanks for all your hard work!
looked up a video online that said to "pull request" but that didn't quite work
would really appreciate the help
thank you in advance
Hi, I have a little question about the third question of module 1 (Array trigonometry), according to my calculations the answer is:
In [23]: p
Out[23]: 7
In [24]: r
Out[24]: array([ 11.2, 4.7, 6.6])
In [25]: numpy.power((numpy.sin(p/r)),3)
Out[25]: array([ 0.20030151, 0.99009101, 0.66454238])
ans: 0.9900
Is there something wrong? Because I can't check the answer. Thanks in advance...