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

比如
ffffm.abc.def=8;
ffffm.ccc.def=8;
要删除包含abc这一指令行,即变成
ffffm.ccc.def=8;
如何实现》

 Accepted Answer

zabidan
zabidan on 15 May 2023

0 votes

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

More Answers (0)

Categories

Tags

Asked:

on 15 May 2023

Answered:

on 15 May 2023

Community Treasure Hunt

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

Start Hunting!