Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

complie m file to mex

1 Ansicht (letzte 30 Tage)
Fan Sudi
Fan Sudi am 8 Jan. 2013
Geschlossen: MATLAB Answer Bot am 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.

Antworten (0)

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by