www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/FindMEXFileExtensionforMacPlatformExample.m
%% Find MEX File Extension for Mac Platform %% % Get the list of file extensions for supported platforms. extlist = mexext('all'); %% % The |mex| command identifies a platform by its |arch| value, which is % the output of the |computer('arch')| command. For Mac platforms, the value % is |maci64|. % % Search the |arch| field in |extlist| for |'maci64'|, and % display the corresponding |ext| field. for k=1:length(extlist) if strcmp(extlist(k).arch, 'maci64') disp(sprintf('Arch: %s File Extension: %s', extlist(k).arch, extlist(k).ext)) end end