I'm getting the following error when I try to run some function m-files: ??? Undefined function or method '[name of function]' for input arguments of type 'double'.
I know this usually happens when the file isn't in the working directory, but that's not the case here.
When I was running these m-files in a different directory on my computer, it worked fine. I moved them to another directory on my laptop, and they're still fine, but I get this error on two of my desktops.
No products are associated with this question.
Are you function names in mixed case, and your laptop runs Windows but your desktop runs Linux ?
change the working directory to the folder where you have your code or add the path.
Go to the File and choose the Set Path
Please consider that you should be EXACTLY in the same directory; and not even in sub-directories within the right path.
I hope this solves the case. It worked for me.
I've encountered this error when attempting to call MEX functions that were built/compiled on machines running a different version of Windows.
e.g. I build a MEX file from source code on a 32 bit machine, transfer it somewhere down the road to a 64 bit machine, and then attempt to call the function.
Seems like this error often has little to do with the arg type being 'double.'
in case of the sin(a) just dont put the '', then it works fine, at least on winxp 32bit
In my case, there was a function that is used in my code but it was not in the directory, so by changing the location of the sub function and copying in the active directory , the problem is solved now.
Before run function, add current absolute path:
And this worked for me.
I am pretty sure that the reason why this problem happened is because of the license of the toolbox (package) in which this function belongs in. Write
and see what will be the result. If it returns path of the function and the comment
"Has no license available",
then the problem is related to the license. That means, license of the package is not set correctly. Mostly it happens if the package (toolbox) of this function is added later, i.e., after installation of the original `matlab`. Please check and solve the license issue, then it will work fine.