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 I'm assuming that Matlab will read the function when it's starting and that this function therefore should be available to use.

However, when I type

```
>> divrat(w, C)
```

I get the following error

??? Undefined function or method 'divrat' for input arguments of type 'double'.

What is the error message telling me to do, I can't see any error in the code or the function call?