|
|
@@ -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
|
|
|
+
|