Jason Blizzard’s Post

View profile for Jason Blizzard, graphic

Student at Udemy Alumni "Emotion motivates, but reason guides."

The expression [t0, t_end + dt, dt] with values t0=0, t_end=2, and dt=0.005 will calculate up to but not exceeding 2. It works like this: Starting at 0, it adds 0.005 repeatedly: 0, 0.005, 0.010, 0.015... all the way up to 1.995. The final step would be 1.995 + 0.005 = 2.000, not 2.000 + .005 with .005 then excluded from 2.005. This creates an array of evenly spaced values from 0 to 2 with steps of 0.005. The inclusion of dt in the end value (t_end + dt) ensures that the final value of 2 is included in the range.

  • logo

To view or add a comment, sign in

Explore topics