这是做什么的?
u = [5 6];
s = [1 1];
data1 =[randn(10,1) -1*ones(10,1)];
data2 =[randn(10,1) ones(10,1)];
data = [data1; data2];
deviance = bsxfun(@minus,data,u);
deviance = bsxfun(@rdivide,deviance,s);
deviance = deviance .^ 2;
deviance = bsxfun(@plus,deviance,2*log(abs(s)));
[dummy,mini] = min(deviance,[],2);
没有 bsxfun 有没有等效的方法?