Info

此问题已关闭。 请重新打开它进行编辑或回答。

complie m file to mex

1 次查看(过去 30 天)
Fan Sudi
Fan Sudi 2013-1-8
关闭: MATLAB Answer Bot 2021-8-20
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 个)

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by