This repository has been archived on 2021-05-17. You can view files and clone it, but cannot push or open issues or pull requests.
scientificComputing/regression/code/meanSquaredErrorCubic.m

12 lines
347 B
Matlab

function mse = meanSquaredError(x, y, c)
% Mean squared error between data pairs and a cubic relation.
%
% Arguments: x, vector of the input values
% y, vector of the corresponding measured output values
% c, the factor for the cubic relation.
%
% Returns: mse, the mean-squared-error.
mse = mean((y - c*x.^3).^2);
end