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

📄 reviseallg.m

📁 Continuous Profile Models (CPM) Matlab Toolbox.
💻 M
字号:
% function newG = reviseAllG(G,input)%% Given G, and an input vector 'input', constructed by% getGuessVec(G), adjust G so as to reflect these parametersfunction newG = reviseAllG(G,input)%% 'last' and 'ind' are for indexing into input to get the%% parameters out in the same way we put them innewG = G;ind=1;if (G.updateZ)  last = length(G.z(:)) + ind -1;  tmpZ = reshape(input(ind:last),size(G.z));  if (G.useLogZ)    tmpZ = exp(tmpZ);  end  newG.z = tmpZ;  ind = last+1;endif (G.updateU)  last = length(G.u(:)) + ind -1;  newG.u = reshape(input(ind:last),size(G.u));  ind = last+1;endif (G.updateSigma)  last = ind;  %% have to be careful here, only have one sigma per class in 'input'  for cc=1:G.numClass    newG.sigmas(G.class{cc}) = input(ind:last);    ind = last+1;    last = ind;  endendif (G.updateTime)  last = length(G.D(:)) + ind -1;  newD = reshape(input(ind:last),size(G.D));  ind = last+1;end  if (G.updateScale)  last = length(G.S(:)) + ind -1;  newS = reshape(input(ind:last),size(G.S));  ind = last+1;endif (G.updateTime | G.updateScale)  newG = reviseG(G,newS,newD);end

⌨️ 快捷键说明

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