If it is a variable double, I suggest you set a breakpoint at the place where you enter the function, and then run there one step at a time, stop and look at the current values of each variable in the main window of MATLAb to see if it is a double.
If not, ask the teacher. It's hard to judge a problem with only one wrong hint.