Kodeco Forums

Numerical Algorithms using Playgrounds

Learn how to use numerical algorithms in iOS by using Playgrounds.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/1763-numerical-algorithms-using-playgrounds

What do you mean when you say >> add a value history to the line xoldEuler = x and Add a value history to the line x = amplitude * sin(omega * i + phase) and you’ll see the oscillator moving.
i’m trying to see animation of graph

ALSO

osci.solveUsingSolver(solveEuler) and osci.solveUsingSolver(solveExact) are throwing me errors i solved it using
osci.solveEuler(amplitude: 50, phase: 10, kSpring: 0.5, mass: 10, t: 0.1)
and
osci.solveExact(kSpring: 0.5, mass: 10, phase: 10, amplitude: 50, t: 0.1)
respectively

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!