How to replace multiple strings in a txt file and keep the original format

1 回表示 (過去 30 日間)
Ferial Assmani
Ferial Assmani 2013 年 3 月 24 日
Hi all, my problem is how to replace multiple strings in a txt file and keep its original format; the original file is
Section = 1
*Lookhere
10
Dont Lookhere
Section = 2
*Lookhere
20
Dont Lookhere
the post changed file is
Section = 1
*Lookhere
1000
Dont Lookhere
Section = 2
*Lookhere
2000
Dont Lookhere
So i must localize the n (* Lookhere) argument and i read the n numbers just after this argument and i store them in a vector to change them via a function (*100 for example) and i re write the file with the same original format
Tanks at advance

回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by