The error says, that your function callfun
has a syntax error in line 20. Probably some character which is not allowed.
Unexpected matlab expression in function
Frage
I have the following call to a function:
callfun(I1, I2, [X Y ones(n,1)], w, m)
But, I'm getting:
Error: File: callfun.m Line: 20 Column: 3
Unexpected MATLAB expression.
Why is that?
Thanks.
Lösung
Andere Tipps
It can be also a problem of duplicated function definition. A function inside callfun.m may have the same name as a built-in MATLAB function, what yields an error.
Do you have any user-defined functions called builtin, strjoin, or strsplit? MATLAB has these defined internally, and having any outside functions that shadow these built-in ones would result in this error. If you are unsure if you have created such functions, typing the command:
>>which functionName -all
will show you the path to all items on the MATLAB path with the name "functionName"
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow