标签:mat com compute put matlab ini highlight number ecos
function J = computeCostMulti(X, y, theta) m = length(y); % number of training examples J = 0; for i = 1:m J = J + (X(i,:) * theta - y(i,1)) ^ 2 end; J = J / (2 * m); end
[ML] CostFunction [Octave code]
标签:mat com compute put matlab ini highlight number ecos
原文地址:http://www.cnblogs.com/KennyRom/p/6523381.html