from
disp_inmem
by georg
List necessary files before packing, publishing or sharing programs.
|
| disp_inmem(dir,zip_file)
|
function disp_inmem(dir,zip_file)
%DISP_INMEM display function for INMEM
% DISP_INMEM displays the result of INMEM.
% DISP_INMEM(DIR) displays only those loaded from the directory DIR and
% its subdirectories.
% DISP_INMEM(DIR,ZIPFILE) packs the files into a zip file (java must be
% installed).
%
% See also INMEM.
% georg ogris ::: csn ::: umit, spring 2005
[mm,xx] = inmem('-completenames') ;
if exist('dir','var')
m = {} ; x = {} ;
for i = 1:numel(mm)
if ~isempty(strfind(mm{i},dir))
m{end+1,1} = mm{i} ;
end
end
for i = 1:numel(xx)
if ~isempty(strfind(xx{i},dir))
x{end+1,1} = xx{i} ;
end
end
s = ' from ' ;
else
m = mm ; x = xx ;
s = ''; dir = '' ;
end
disp(' ')
disp('========================================')
disp(['matlab functions loaded',s,dir,':'])
disp(m)
disp(' ')
disp('========================================')
disp(['mex functions loaded',s,dir,':'])
disp(x)
if exist('zip_file','var')
l = [m;x] ;
if ~isempty(l)
zip(zip_file,l) ;
disp(' ')
disp(['Files packed into ',zip_file]) ;
else
warning('Empty file list. No zip file created.')
end
end
|
|
Contact us at files@mathworks.com