matthiasm@0: function d = flstMakeData(mdl, memory) matthiasm@0: matthiasm@0: % makeFLSTData just returns a struct that contains all the necessary data matthiasm@0: % for a Fixed Lag Sparse Transition Viterbi decoder. matthiasm@0: matthiasm@0: init = mdl.init; matthiasm@0: transFrom = mdl.transFrom; matthiasm@0: transTo = mdl.transTo; matthiasm@0: transProb = mdl.transProb; matthiasm@0: matthiasm@0: d = struct(); matthiasm@0: d.init = init(:); matthiasm@0: d.from = transFrom; matthiasm@0: d.to = transTo; matthiasm@0: d.prob = transProb; matthiasm@0: d.memory = memory; matthiasm@0: d.nState = length(init); matthiasm@0: d.nTrans = length(transFrom); matthiasm@0: d.delta = ones(d.nState, 1) / d.nState; matthiasm@0: d.oldDelta = ones(d.nState, 1) / d.nState; matthiasm@0: d.psi = zeros(d.nState, memory); matthiasm@0: d.scale = ones(1, memory); matthiasm@0: d.updateCount = 0; matthiasm@0: d.path = [];