reviseg.m

来自「Continuous Profile Models (CPM) Matlab T」· M 代码 · 共 41 行

M
41
字号
% function newG = reviseG(G,S,D,forceIt)%% If HMM scale and/or time transition probs have been altered,% this updates the larger data structures involved.%% if 'forceIt'=1, does the S update no matter whatfunction newG = reviseG(G,S,D,forceIt)if ~exist('forceIt')  forceIt=0;endnewG=G;if exist('S') && ~isempty(S)  %if (newG.S~=S) %check that it is different  if forceIt | any(abs(newG.S-S>0))    newG.S=S;    newG.scaleTransLog = getLogScaleTrans(newG);     endendif exist('D')    if ~forceIt        notSame = length(find(G.D(:)-D(:)))>0;    else        notSame=1;    end    if notSame %check that it is different        newG.D=D;        newG.timeTransLog  = getLogTimeTrans(newG);    endendnewG.stateTransLog = getStateTransLog(newG);newG.stateTrans = getStateTrans(newG);return;

⌨️ 快捷键说明

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