Code covered by the BSD License  

Highlights from
% MATLAB Comment Stripping Toolbox

4.71429

4.7 | 7 ratings Rate this file 29 Downloads (last 30 days) File Size: 5.32 KB File ID: #4645
image thumbnail

% MATLAB Comment Stripping Toolbox

by

 

18 Mar 2004 (Updated )

A small collection of utilities for stripping MATLAB comments from strings and files.

Editor's Notes:

This file was selected as MATLAB Central Pick of the Week

| Watch this File

File Information
Description

This is a small collection of utilities for stripping MATLAB comments from MATLAB code. The code may be given in strings, cell arrays of strings, or read from a file or file identifier. There is full support for stripping comments from multi-line strings, that is strings with embedded newlines, which typically appear when an entire file is read in one go.

Acknowledgements

This file inspired Missingsemicolons and Remove Comments(Filename,Comment Indicator).

MATLAB release MATLAB 6.5 (R13)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (8)
28 Jun 2013 Rody Oldenhuis

Awesome, thanks :)

07 Apr 2012 Oleg Komarov

Ideal for matlab contests...

12 Nov 2009 Carlos Adrian Vargas Aguilera

Oh, besides of the NOT ignored lines after "...", also grouped comments are NOT ignored:
%{
bla
bla
%}
Carlos

12 Nov 2009 Carlos Adrian Vargas Aguilera

Great functions. Only my comments after a three points were left!

09 Oct 2009 Muhammad Arsalan

hi, very nice application. But when it works perfect up to line 277 after that it don't work as it supposed to work. There there anything that i can change?? like some memory limitations?? i need to use it on a file with 17000 lines. Any suggestions please.

29 Mar 2006 Scott Otterson

Useful. A bit out of date, though: With R14, I'm getting a many copies of this warning:

Warning: The 'tokenize' option for regexprep is now the default behavior. If I remove 'tokenize' it goes away.

27 Jul 2005 Balaji Rangaswamy  
24 Mar 2004 Brett Shoelson

Excellent! This is regular expressions on steroids...makes quick work of comment stripping. Thanks, Peter.

Contact us