Skip to content

Instantly share code, notes, and snippets.

View jgraving's full-sized avatar

Jake Graving jgraving

  • Max Planck Institute of Animal Behavior
  • Konstanz, Germany
View GitHub Profile
@jgraving
jgraving / BlahutArimoto.m
Created April 4, 2017 10:20 — forked from Piyush3dB/BlahutArimoto.m
Blahut-Arimoto algorithm implementation in Matlab
function [C r] = BlahutArimoto(p)
disp('BlahutArimoto')
% Capacity of discrete memoryless channel
% Blahut-Arimoto algorithm
% Input
% p: m x n matrix
% p is the transition matrix for a channel with m inputs and n outputs
@jgraving
jgraving / angleLerp.js
Created December 20, 2016 22:18 — forked from shaunlebron/angleLerp.js
The best way to interpolate 2D angles
/*
2D Angle Interpolation (shortest distance)
Parameters:
a0 = start angle
a1 = end angle
t = interpolation factor (0.0=start, 1.0=end)
Benefits:
1. Angles do NOT need to be normalized.