Error after compiling figure as exe, but running figure causes no problems
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Marc Jakobi
el 4 de Abr. de 2014
Comentada: x Wang
el 25 de Jun. de 2022
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 comentarios
Respuesta aceptada
Marc Jakobi
el 4 de Abr. de 2014
1 comentario
x Wang
el 25 de Jun. de 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
Más respuestas (0)
Ver también
Categorías
Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!