summaryrefslogtreecommitdiff
path: root/Tutorial3_Curve_fitting/Scilab_code/errorfun.sci
blob: 0b9330422fb1b952a13a2aea1a56a6e1ad9b4905 (plain)
1
2
3
4
//A function to compute error between computed data and measured data
function err = errorfun(x, time, measured_data, weight_matrix)
   err = weight_matrix.*(fit_function(time, x) - measured_data )
endfunction