% The variance between data and theory as a function of the parameters p
% Jho_var(p,f,Jdata) ; p=[f0,q] 
% Jdata and f have to be be rows
function V=Jhosc_var(p,f,Jdata)
Jtheory=Jhosc(p,f);
V=(Jdata-Jtheory)*(Jdata-Jtheory)'; % when X is a row, X' is a column 
% with the complex conjugated elements, X*X' is the inner product