Code covered by the BSD License  

Highlights from
program_statistics

4.66667

4.7 | 3 ratings Rate this file 1 Download (last 30 days) File Size: 3.44 KB File ID: #5320

program_statistics

by Laurent Cavin

 

21 Jun 2004 (Updated 22 Jun 2004)

PROGRAM_STATISTICS compiles some statistics about a program. A report is printed;

| Watch this File

File Information
Description

This simple m-file compiles some statistics about a program. A report is printed; statistics can be optionally returned in a structure.

The statistics include:
* number of files,
* number of functions and GUIDE-related functions,
* number of lines, words and characters,
* number of pages required to print out the whole program.

It features recursive subdirectory search and inclusion of any type of text file (e.g. ".c" to take compiled dll libraries into account).

More on http://ltcmail.ethz.ch/cavin/CSEDBLib.html#PROGSTAT

Example of report:
==================
Number of folders parsed: 44
Number of code folders: 8 (22.125 files per folder)
 
Number of files: 177
    - including 588 functions (3.322 functions per file),
    - including 25 GUI dialog callback files made with GUIDE,
         (linked with .fig files weighting 657.3438 Kb)
    - including 335 GUIDE-related functions,
    - including 253 other functions (1.6645 functions per file).
 
Number of lines: 40600
    - distributed in 172234 words,
    - including 2774 (6.8325%) separation lines,
    - including 8606 (21.197%) lines of comments,
    - including 29220 (71.9704%) lines of code.
 
Number of characters: 1549343
    - including 407452 (26.2984%) comment characters,
    - including 1141891 (73.7016%) code characters.
 
To print the whole program, 1014 A4-pages would be necessary.

MATLAB release MATLAB 6.5 (R13)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (4)
14 Jul 2004 nameless namesis

nice, liked it a lot, very useful, especially since it can return data as a structure

22 Mar 2005 Andrej Mosat

Compared to sloc function in the exchange is this a Porsche against Wartburg. Nice job. But I don`t see if it includes also private folders (beginning with @ sign or not).

22 Sep 2005 Felix The Cat

Very nice! Gives some real interesting statistics.

The code could have some inline comments and somethings wrong with the figure file detection, but this may be caused by a different Matlab version.

(The example report is some kind of show-off isn't?)

23 Sep 2005 Laurent Cavin

Well actually, the example report is not a show-off, but the reason why I developed program_statistics...
A big 3-year-long project for my PhD :-)

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
development environment Laurent Cavin 22 Oct 2008 07:24:44
multifile program Laurent Cavin 22 Oct 2008 07:24:44
number of characters Laurent Cavin 22 Oct 2008 07:24:44
lines Laurent Cavin 22 Oct 2008 07:24:44
words Laurent Cavin 22 Oct 2008 07:24:44

Contact us at files@mathworks.com