Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.52 KB | None | 0 0
  1. let curling() =
  2.   let pi = acos(-1.) in
  3.   let r =  91. /. (4. *. pi) in
  4.   let s = pi *. r**2. in
  5.   let cx = 826. in
  6.   let m = 19.97 in
  7.   let a = (cx*.s) /. (2. *.m) in
  8.   let f u t = [|u.(1); ( -.a) *. (u.(1))**(1. /.3.)|] in
  9.   let tabt, tabx = RK.rk f [|0.;2.|] 0. 1. 25 in
  10.   let c = Array.make (Array.length tabx) 0. in
  11.   for i = 0 to Array.length tabx - 1 do
  12.     c.(i) <- tabx.(i).(0)
  13.   done;
  14.   Mat.afficher [| c |];
  15.   let g = T.initialiser "Curling" in
  16.   T.tracer_xy g tabt c "Distance(t)" ~couleur:C.rouge;
  17.   T.fermer g;
  18. ;;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement