Mercurial > hg > flst
annotate matlab/flstMakeData.m @ 1:4283604499f8 tip
added mini probability to delta (not sure if this is a good idea, but I did it)
author | matthiasm |
---|---|
date | Mon, 10 Nov 2014 19:38:49 +0000 |
parents | 1df4a6fb0d22 |
children |
rev | line source |
---|---|
matthiasm@0 | 1 function d = flstMakeData(mdl, memory) |
matthiasm@0 | 2 |
matthiasm@0 | 3 % makeFLSTData just returns a struct that contains all the necessary data |
matthiasm@0 | 4 % for a Fixed Lag Sparse Transition Viterbi decoder. |
matthiasm@0 | 5 |
matthiasm@0 | 6 init = mdl.init; |
matthiasm@0 | 7 transFrom = mdl.transFrom; |
matthiasm@0 | 8 transTo = mdl.transTo; |
matthiasm@0 | 9 transProb = mdl.transProb; |
matthiasm@0 | 10 |
matthiasm@0 | 11 d = struct(); |
matthiasm@0 | 12 d.init = init(:); |
matthiasm@0 | 13 d.from = transFrom; |
matthiasm@0 | 14 d.to = transTo; |
matthiasm@0 | 15 d.prob = transProb; |
matthiasm@0 | 16 d.memory = memory; |
matthiasm@0 | 17 d.nState = length(init); |
matthiasm@0 | 18 d.nTrans = length(transFrom); |
matthiasm@0 | 19 d.delta = ones(d.nState, 1) / d.nState; |
matthiasm@0 | 20 d.oldDelta = ones(d.nState, 1) / d.nState; |
matthiasm@0 | 21 d.psi = zeros(d.nState, memory); |
matthiasm@0 | 22 d.scale = ones(1, memory); |
matthiasm@0 | 23 d.updateCount = 0; |
matthiasm@0 | 24 d.path = []; |