SplitFunctions

takes a file with many functions in it and splits those functions up into as many files, entitled wi
2K téléchargements
Mise à jour 8 sept. 2005

Aucune licence

SPLITFUNCTIONS takes a file with many functions in it and splits those functions up into as many files, entitled with the function names

SPLITFUNCTION(FILENAME) splits the file into parts and puts those parts
in the same directory as FILENAME
SPLITFUNCTION(FILENAME,TARGETDIR) splits the file, putting parts in
TARGETDIR
SPLITFUNCTION(FILENAME,TARGETDIR,DOWAITBAR) same as above but uses
waitbar to show progress.

It will turn
<foo.m starts>
function a
...
function [a,b] = b
...
function [a,b] = c(d,e)
....
<foo.m ends>
In to:
<a.m starts>
function a
...
<a.m ends>
<b.m starts>
function [a,b] = b
...
<b.m ends>
<c.m starts>
function [a,b] = c(d,e)
....
<c.m ends>
SEE ALSO regexp regesprep strrep strfind findstr strmatch
KEY WORDS regular expressions split file function script procedure


It's not fancy, but it works

Citation pour cette source

Michael Robbins (2024). SplitFunctions (https://www.mathworks.com/matlabcentral/fileexchange/8126-splitfunctions), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R14SP1
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Environment and Settings dans Help Center et MATLAB Answers
Remerciements

A inspiré : FSplit

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0.0

?