Advertisement
Guest User

Untitled

a guest
Aug 21st, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. SeedRandom[1]
  2. region = ConvexHullMesh[RandomReal[{-1, 1}, {50, 2}]]
  3.  
  4. sol = Minimize[Indexed[x, 2], x ∈ RegionBoundary@region]
  5. point = x /. Last@sol
  6. (* {-0.976044, {x -> {0.579608, -0.976044}}} *)
  7. (* {0.579608, -0.976044} *)
  8.  
  9. (* plot the solution: *)
  10. Show[region, Epilog -> {Point@x /. Last@sol}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement