%#function for feval

2 visualizaciones (últimos 30 días)
Fan Sudi
Fan Sudi el 2 de Abr. de 2012
function varargout = FMath(varargin)
if nargin == 0
OldHandle = findobj('Style','figure','Tag','FMath');
if ishandle(OldHandle)
close(OldHandle);
end
FMathHandle = figure ;
set(FMathHandle,'Tag','FMath','Units','pixel',... 'menubar','none','NumberTitle','off',...
'name','FMath计算器V 1.0','Resize','off',...
'Visible','off','Position',[50 100 397 500]);%1120 755 397
generate_figure(FMathHandle);
%movegui(FMathHandle,'center');
set(gcf,'Visible','on');
elseif ischar(varargin{1})%&~isnumeric(varargin{end})
try
if (nargout)
[varargout{1:nargout}] = feval(varargin{:});
else
feval(varargin{:});
end
catch
disp(lasterror);
end
end
%--------------------------------------------------------------------------
function generate_figure(FMathHandle)
Maybe I have many many callback functions so that it is may not to add that for each one.After All,varargin is only a invisibility function.Once I used it in Matlab6.5,there's no this problem.serval months ago,I used 6.5,everything is fine.
  1 comentario
Jan
Jan el 2 de Abr. de 2012
You forgot to mention the problem or ask a question.
Please format your code as explained in the "Markup help" link. Thanks!

Iniciar sesión para comentar.

Respuestas (1)

Kaustubha Govind
Kaustubha Govind el 4 de Abr. de 2012
I think you are asking what you should do in a situation where the %#function pragma cannot be specified like in the example code you provided? You can simply add all the functions that could potentially called by FEVAL using the mcc -a option, or add all the relevant functions under "Additional/Other Files" if using deploytool. This is also mentioned as a workaround on Fixing Callback Problems: Missing Functions.

Categorías

Más información sobre Licensing on Cloud Platforms en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by