4.33333

4.3 | 3 ratings Rate this file 93 downloads (last 30 days) File Size: 5.73 KB File ID: #5563

SubFuns

by Robert Bemis

 

26 Jul 2004 (Updated 06 Aug 2004)

Code covered by BSD License  

Command-line utility to list all function declarations within a specified m-file.

Editor's Notes:

This file was a File Exchange Pick of the Week

Download Now | Watch this File

File Information
Description

The MATLAB Editor provides a pull-down tool to Show Functions within an open m-file. But suppose you want to see function decalarations inside an m-file without editing. Perhaps you need to debug GUI callbacks, or understand someone else's function. You may not remember everything in a long list of functions after the Show Functions pull-down disappears. In these situations it would be helpful if the function list would hang around for reference. That's what this utility does.

This utility also highlights some interesting new capabilities of the MATLAB 7 desktop enviroment such as hyperlinks in the Command Window. Also, check out the code for examples of nested functions, block comments, and TODO/FIXME notes.

Acknowledgements
This submission has inspired the following:
HyperSubFunHelp
MATLAB release MATLAB 7 (R14)
Zip File Content  
Published M Files test_subfuns
Other Files SubFuns.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
30 Jul 2004 Bob Johnson  
28 Jan 2006 Victor Zakharov

It's need tool

25 Nov 2007 Telmo Amaral

This is very good and fast. Slightly modified, it can be used from within code to provide reflection (that is, to identify which sub-functions are defined in the code itself)! The only glitch is that it gets deceived by functions defined as follows (I sometimes use this formatting style, to have all function names vertically aligned).

function output =...
   fun(input)

05 Jul 2008 abelardo castro rincon

gracias por hacerme una invitacion esta pajina es muy interesante

29 Jul 2009 Jimy Shah

Its a very helpful tool. Thanks !

Please login to add a comment or rating.
Updates
06 Aug 2004

Bug fix: original errored m-files with only one function declaration. Also added comments and updated description to highlight some new language and desktop features with MATLAB 7 (Release 14).

Tag Activity for this File
Tag Applied By Date/Time
nested function Robert Bemis 22 Oct 2008 07:28:27
subfunction Robert Bemis 22 Oct 2008 07:28:27
subfuns Robert Bemis 22 Oct 2008 07:28:27
utilities Robert Bemis 22 Oct 2008 07:28:27
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com