Skip to content

Instantly share code, notes, and snippets.

@innerlee
Created January 16, 2017 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save innerlee/586a100bac0e5d18fb7e0e7ffe357cbe to your computer and use it in GitHub Desktop.
Save innerlee/586a100bac0e5d18fb7e0e7ffe357cbe to your computer and use it in GitHub Desktop.
# surf
using Plots
g = 0.01:0.01:1
xgrid = repmat(g', 100, 1)
ygrid = repmat(g, 1, 100)
z = -log.(xgrid .* ygrid)
zgrid = zeros(100, 100)
for i = 1:100, j = 1:100
zgrid[i,j] = i + j < 100 ? z[i,j] : -1
end
surface(xgrid, ygrid, zgrid)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment