boxoss.m

来自「蒙特卡罗方法及其例子」· M 代码 · 共 18 行

M
18
字号
function ss=boxoSS(theta,data,local)% sum-of-square function for the boxo examplenbatch = length(data);% cumulate the sum-of-squares over the data sets (batches)ss = 0;for i=1:nbatch    th     = theta(local==0|local==i);  tspan  = data{i}.ydata(:,1);  ydata  = data{i}.ydata(:,2:3);  ymodel = boxoM(data{i},th);  ss = ss + sum((ydata - ymodel).^2);  end

⌨️ 快捷键说明

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