m文件删除包含某字符串的这一行指令。

3 views (last 30 days)
peichi
peichi on 15 May 2023
Answered: zabidan on 15 May 2023
比如
ffffm.abc.def=8;
ffffm.ccc.def=8;
要删除包含abc这一指令行,即变成
ffffm.ccc.def=8;
如何实现》

Accepted Answer

zabidan
zabidan on 15 May 2023
m文件本身就一文本文件,当成txt文件读进来,regexp删掉不用的行再写出呗

More Answers (0)

Categories

Find more on 字符和字符串 in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!