Skip to content

Instantly share code, notes, and snippets.

@GordStephen
GordStephen / DualUnscentedKalman.jl
Created January 15, 2016 16:05
Implements a dual-estimation square-root unscented Kalman filter with univariate noise-free observations, a parameter-free linear measurement transform, nonlinear process evolution and general (non-additive) process noise.
import Base.filter
"""
Implements a dual-estimation square-root unscented Kalman filter
with univariate noise-free observations, a parameter-free linear
measurement transform, nonlinear process evolution and general
(non-additive) process noise.
"""
immutable DualEstimationModel
@GordStephen
GordStephen / cholupdate.jl
Created November 29, 2015 04:24
Hack to add cholupdate functionality from qrupdate in Julia
function cholupdate!(S::Matrix{Float64}, u::Vector{Float64}, downdate::Bool=false, checks::Bool=true)
n = size(S,1)
if checks
@assert size(S,2) == n
@assert length(u) == n
@assert all(diag(S) .!= 0)
end #if
# Simulate Gen III Feebas fishing
S = 100000 # Simulations per cast count choice
N = 446 # Number of accessible water tiles on Route 119
K = 6 # Number of Feebas tiles on the map
p = .5 # Probability of encountering a Feebas on a Feebas tile
M = 6 # Maximum number of casts per tile to simulate
find_feebas(is_feebas_tile) = is_feebas_tile ? rand() < p : false
julia> type A{S<:AbstractArray}
data::S
end
julia> type B{T,N}
data::AbstractArray{T,N}
end
julia> type C{T}
data::AbstractMatrix{T}
@GordStephen
GordStephen / node .jshintrc
Last active December 30, 2015 02:39 — forked from haschek/.jshintrc
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true