Okay, I found the problem. I included a function "TimeZoneConvert.m" which seems to use toolbox functions that cannot be deployed.
Error after compiling figure as exe, but running figure causes no problems
1 view (last 30 days)
Show older comments
Hi.
I have created a figure in GUIDE and tested it multiple times. It works fine. However, when I use deploytool to compile an executable and I run the .exe file, I get the error message "DATENUM failed. Error in => ImportTool.m at line 42"
I have checked the ImportTool.m function. There is no datenum in line 42.
This is the initialization code:
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ImportTool_OpeningFcn, ...
'gui_OutputFcn', @ImportTool_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
Line 42 is the following:
gui_mainfcn(gui_State, varargin{:});
before the last else
Any idea what could be the problem? I guess gui_mainfcn() uses datenum and for some reason it failed... I will check again, but I am pretty sure I have not left out any of the necessary functions.
0 Comments
Accepted Answer
Marc Jakobi
on 4 Apr 2014
1 Comment
x Wang
on 25 Jun 2022
same thing happened to me ,I used a function file ,but it didn't use any toolbox functions,there are just some math expressions.How did you fix this? A million THX
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!