Info
This question is closed. Reopen it to edit or answer.
complie m file to mex
1 view (last 30 days)
Show older comments
function varargout = foo( varargin )
if ishandle( varargin{1} )
ClickHandle = varargin{1} ;
OldHandle = findobj( 'Type', 'figure', 'Tag', 'foo');
if ishandle( OldHandle )
delete( OldHandle );
end
FHandle = SD_figure ;
set( FHandle,...
'Tag', 'foo',...
'Units', 'pixel', ...
'menubar', 'none',...
'NumberTitle', 'off',...
'Visible', 'off',...
'resize', 'off'...
) ;
setappdata( FHandle, 'ClickHandle', ClickHandle ) ;
generate_figure( FHandle );
Init_figure( FHandle ) ;
movegui( FHandle, 'center' );
set( FHandle, 'Visible', 'on' );
elseif ischar( varargin{1} )
try
if (nargout)
[varargout{1:nargout}] = feval( varargin{:} );
else
feval( varargin{:} );
end
catch
disp( lasterr );
end
end
%---------------------------------------------------------------------------------
function generate_figure( FHandle )
global GlobalValue ;
....
This m file Contains a lot of functions.Add the input varargin can't be persistent.However,this file include global variable. how to complie it to mex.
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!