Undefined function for input type 'cell'
Show older comments
Hello,
I've encountered an interesting problem while making functions which I was not experiencing before. I've been going through my code to generalize it and separate it into more manageable sections by creating functions, and in one function I just created it I am getting the error
Undefined function 'myFunction' for input arguments of type 'cell'.
Which is strange because up to this point my custom functions have been not giving me this error when I pass a cell array to them and the code within the function should handle the cell array just fine, but the error seems to be rejecting the input all together any way without doing any operations on it since the error appears to be generated from the input being purely of a type cell.
Does anyone have any experience with such errors? Why should one pop up now when my other functions can handle cell arrays just fine?
Thanks for any help.
5 Comments
dpb
on 29 Apr 2018
Where's the Crystal Ball Toolbox when we need it?
Only seeing at least the prototype for myFunction will give a klew...
Andrew Chen
on 29 Apr 2018
dpb
on 30 Apr 2018
Well, as suspected, the prototype was the minimum; the other possibility is a path or spelling problem...what does
which tabulateKNN
return?
If that succeeds and returns the expected result, then need to see a sample case that exhibits the symptom including error message in context. Ideal would be to supply a small working (in the sense it runs and creates the issue) example...you can attach m-file and .mat file for the necessary data.
What does _whi
Andrew Chen
on 30 Apr 2018
dpb
on 30 Apr 2018
That's what was the which would show...once it was clear there wasn't something done in the function statement that was dependent upon calling class...I didn't (and don't) recall if the wording is slightly different for the extant function w/o a class variant from the totally missing or not which is why asked for function prototype info first...
Accepted Answer
More Answers (0)
Categories
Find more on Call C++ from MATLAB in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!