Răsfoiți Sursa

exercise 4.5: problem statement

George C. Privon 1 an în urmă
părinte
comite
7fbdf84717
1 a modificat fișierele cu 32 adăugiri și 0 ștergeri
  1. 32 0
      04-motion/exercises/ex4.5.hs

+ 32 - 0
04-motion/exercises/ex4.5.hs

@@ -0,0 +1,32 @@
+-- Exercise 4.5
+-- George C. Privon
+-- 2024-07-20
+
+type R = Double
+
+type Time = R
+type Position = R
+type Velocity = R
+type Acceleration = R
+
+type PositionFunction = Time -> Position
+type VelocityFunction = Time -> Velocity
+type AccelerationFunction = Time -> Acceleration
+
+pos1 :: PositionFunction
+pos1 t = if t < 0
+         then 0
+         else 5 * t**2
+
+vel1Analytic :: VelocityFunction
+vel1Analytic t = undefined
+
+acc1Analytic :: AccelerationFunction
+acc1Analytic t = undefined
+
+vel1Numerical :: VelocityFunction
+vel1Numerical t = undefined
+
+acc1Numerical :: AccelerationFunction
+acc1Numerical t = undefined
+