Home > atmlab > handy > extra.m

extra

PURPOSE ^

EXTRA Lists non-Matlab functions.

SYNOPSIS ^

function extra

DESCRIPTION ^

 EXTRA   Lists non-Matlab functions.

    Lists all functions in the search path that are found in non-Matlab
    folders. Folders with a path containing both matlab and toolbox are
    judged to be Matlab folders.
    
    The working directory (PWD) is not included if it is not in the 
    search path.
     
 FORMAT   extra

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

extra.m

SOURCE CODE ^

0001 % EXTRA   Lists non-Matlab functions.
0002 %
0003 %    Lists all functions in the search path that are found in non-Matlab
0004 %    folders. Folders with a path containing both matlab and toolbox are
0005 %    judged to be Matlab folders.
0006 %
0007 %    The working directory (PWD) is not included if it is not in the
0008 %    search path.
0009 %
0010 % FORMAT   extra
0011 
0012 % HISTORY: 2003-03-07  Created by Patrick Eriksson
0013 
0014 
0015 function extra
0016 
0017 
0018 %=== Get search path and loop folders.
0019 %
0020 P = path;
0021 %
0022 while ~isempty( P )
0023 
0024   i = min( [ min( find( P == pathsep ) ) - 1, length(P) ] );
0025 
0026   if isempty( findstr( P(1:i), 'matlab' ) )  &  ...
0027                                        isempty( findstr( P(1:i), 'toolbox' ) )
0028     fprintf('===== %s =====', P(1:i) );
0029     dir( [ P(1:i), filesep, '*.m' ] )
0030   end 
0031 
0032   P = P((i+2):length(P));
0033 
0034 end

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005