Skip to content

Instantly share code, notes, and snippets.

View gabegaster's full-sized avatar

Gabriel Gaster gabegaster

View GitHub Profile
sample_a.dat
sample_b.dat
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js"></script>
</head>
<body>
<div id="chart">
</div>
<script type="text/javascript">
var w = 960,
@gabegaster
gabegaster / holomorphic.jl
Last active December 20, 2015 21:28 — forked from johnmyleswhite/holomorphic.jl
named functions (du_dx, du_dy, dv_dx, dv_dy) to make it completely transparent that the cauchy-riemann equations are being used, and what the actual check is.
# f(z = x + iy) = u(x, y) + i * v(x, y)
function finite_difference{T <: Complex}(f::Function,
z::T,
alongx::Bool = true,
alongu::Bool = true)
epsilon = sqrt(eps(max(abs(one(T)), abs(z))))
if alongx
zplusdz = z + epsilon
else
zplusdz = z + epsilon * im