This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sample_a.dat | |
sample_b.dat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |