Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Creating a Text file from other text file

1 回表示 (過去 30 日間)
Ebadur
Ebadur 2014 年 7 月 18 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Suppose I have a Text file and I want to generate 100 text files from that one. In every text file only one number will be replaced, other will remain same. For Example, the main text file contains AAA BBB 1, the next should be AAA BBB 2, AAA BBB 3 and so on. How to do get that logic? Any type of suggestion would be appreciated.

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 7 月 18 日
編集済み: Azzi Abdelmalek 2014 年 7 月 18 日
out=regexp(sprintf('AAA BBB %d,',1:10),',','split')
out(end)=[]
%or
str='AAA BBB'
out=genvarname(repmat({str},11,1))
out(1)=[]
  1 件のコメント
Ebadur
Ebadur 2014 年 7 月 18 日
Can I send you a personal email if you dont mind?

Community Treasure Hunt

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

Start Hunting!

Translated by