Info

This question is closed. Reopen it to edit or answer.

complie m file to mex

2 views (last 30 days)
Fan Sudi
Fan Sudi on 8 Jan 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
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.

Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!