I'm a new user of Matlab, can you please help: I have the following code in an .M file:
function f = divrat(w, C)
S=sqrt(diag(diag(C)));
s=diag(S);
f=sqrt(w'*C*w)/(w'*s);
I have stored this file (divrat.M) in the normal Matlab path, and therefore Im assuming that Matlab will read the function when its starting and that this function therefore should be available to use.
divrat(w, C) ??? Undefined function or method 'divrat' for input arguments of type 'double'. What is the error message telling me to do, I cant see any error in the code or the function call?