SplitFunctions

版本 1.0.0.0 (1.4 KB) 作者: Michael Robbins
takes a file with many functions in it and splits those functions up into as many files, entitled wi
2.0K 次下载
更新时间 2005/9/8

无许可证

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

引用格式

Michael Robbins (2026). SplitFunctions (https://ww2.mathworks.cn/matlabcentral/fileexchange/8126-splitfunctions), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R14SP1
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Environment and Settings 的更多信息
致谢

启发作品: FSplit

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

?