⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gettimejump.m

📁 Continuous Profile Models (CPM) Matlab Toolbox.
💻 M
字号:
% function timeJumpMats = getTimeJump(G)%% get the two matrixes that are indicator matrixes for% the transition matrix reflecting pairs of states that% correspond to jumping ahead 3,2 and 1 time states% and ignoring the boundary condition states.  % this is used when updating the transition matrixes in the% M-Step%% This has now been generalized to maxTimeSteps, rather than 3function timeJumpMats = getTimeJump(G)steps=1:G.maxTimeSteps;for tj=steps  %tempMat=sparse(G.numStates,G.numStates);  tempMat=logical(sparse(G.numStates,G.numStates));  for tt=1:G.numStates-G.numScales*G.maxTimeSteps; %or (maxTimeSteps-1)    % above, because don't want boundary times    % with different probabilities     thisTime = G.stateToScaleTau(tt,2);    validStates = find((G.stateToScaleTau(:,2)-thisTime)==tj);    %tempMat(tt,validStates)=1;    tempMat(tt,validStates)=true;  end  timeJumpMats{tj}=tempMat;end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -