Advertisement
Guest User

Untitled

a guest
Sep 10th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Julia 0.25 KB | None | 0 0
  1. # answer to 6.3
  2. function altPredict(Xhat)
  3.     red = 2
  4.     blue = 1
  5.     if (Xhat[2] > 37.669007)
  6.         if (Xhat[1] > -96.090109)
  7.             return blue
  8.         else
  9.             return red
  10.         end
  11.     else
  12.         if (Xhat[1] > -115.577574)
  13.             return red
  14.         else
  15.             return blue
  16.         end
  17.     end
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement