Error: Undefined function or method '.....' for input arguments of type 'double'

Hi,
In Matlab I have created a planning optimization code. It calls some functions, both .m files and mex files among others a license file. All these files are in my directory, although not necessqarily in the same folder. In matlab it works great but if I use Builder EX in order to compile a standalone add-in for Excel and I try to use this addd-in in Excel I get the error:
Error in SAM.SAMclass.1_0: Undefined function or method 'PLANNINGSAM' for input arguments of type 'double'.
I do not know how to deal with this error because 'PLANNINGSAM' is in the project which I compiled and the input are two matrices which only contains nuumbers. Can anybody please help me? Thanks!

回答(2 个)

Is there a direct call to PLANNINGSAM, or is it eval()'d or feval()'d or is it listed as a Callback in a string literal (e.g.,
... 'Callback', 'PLANNINGSAM(x,y)', ...
Or is it only invoked through a function that is only called in one of the above ways?
If MATLAB cannot find a direct call in a procedure that is directly called (rather than being named in a string) then the compiler will not know to include the code for the routine. In such a case, the work-around is to put the comment
%#function PLANNINGSAM
in some routine that you are sure is directly called.
Hi,
Thanks for your reply. However, PLANNINGSAM is the main function, the name of the m-file is also PLANNINGSAM:
% joblabelmachine = tabel met welke machines welke job kan uitvoeren
% werkvoorraad = tabel met alle openstaande orders
function planning = PLANNINGSAM(werkvoorraad,joblabelmachine)
% Parameters
begintijd = 8.5; % begintijd werkdag in uren
eindtijd = 17; % eindtijd werkdag in uren
wisseltijd = 2; % wisseltijd tussen machines/jobs in minuten, de minimale wisseltijd is 1 minuut.
M = 10000;
Time = 300;
% Startup
startup;
% Initializations
"startup" is for example another m-file that is being called by PLANNINGSAM. So I think this should be find, but it isn't...

类别

帮助中心File Exchange 中查找有关 Startup and Shutdown 的更多信息

提问:

2011-8-12

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by