No BSD License  

Highlights from
codecount

3.0

3.0 | 1 rating Rate this file 1 Download (last 30 days) File Size: 2.6 KB File ID: #9114
image thumbnail

codecount

by Jasper Menger

 

23 Nov 2005 (Updated 12 Dec 2005)

Counts the total number of code lines of all the M-files in a directory

| Watch this File

File Information
Description

COUNTCODE - Counts the total number of code lines of all the M-files in a directory

Syntax options:
  COUNTCODE
  COUNTCODE(dir_str)
  L = COUNTCODE
  L = COUNTCODE(dir_str)
  
By default the current directory is scanned, and the result is displayed in the command window. Supply the string dir_str for scanning a directory
other than the current one. The result can be stored in cell-array L.

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
23 Nov 2005 urs (us) schwarz

why not simply use this to count the non-empty lines

N_code=sum(~cellfun('isempty',Contents));

us

Please login to add a comment or rating.
Updates
28 Nov 2005

Usefull suggestion from Urs Schwarz.

12 Dec 2005

Bug fix...

Tag Activity for this File
Tag Applied By Date/Time
path Jasper Menger 22 Oct 2008 08:07:20
directories Jasper Menger 22 Oct 2008 08:07:20
files Jasper Menger 22 Oct 2008 08:07:20
count Cristina McIntire 10 Dec 2008 17:03:16
code Cristina McIntire 10 Dec 2008 17:03:16
mfiles Cristina McIntire 10 Dec 2008 17:03:16
directory Cristina McIntire 10 Dec 2008 17:03:16

Contact us at files@mathworks.com