Skip to content

Instantly share code, notes, and snippets.

View fatfingererr's full-sized avatar
Crafting fast algorithms

Ruei-Ci Wang fatfingererr

Crafting fast algorithms
View GitHub Profile
@fatfingererr
fatfingererr / matlab-octave.m
Created January 19, 2017 04:46 — forked from gramian/matlab-octave.m
Octave and Matlab Snippets
%% Math %%
si = @(x) sin(x)./x; % cardinal sine without pi multiplied argument
hsin = @(x) 0.5*(1.0 - cos(x)); % haversed sine
hcos = @(x) 0.5*(1.0 + cos(x)); % haversed cosine
sigm = @(x,k) 0.5*tanh(0.5*k*x) + 0.5; % sigmoid function to (exp(-kx)+1)^-1

Keybase proof

I hereby claim:

  • I am fatfingererr on github.
  • I am fatfingererr (https://keybase.io/fatfingererr) on keybase.
  • I have a public key whose fingerprint is 5F03 3B55 1EF4 D27A 36D5 AA39 F013 CD96 337A 1E28

To claim this, I am signing this object: