Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Creating a Text file from other text file

1 visualización (últimos 30 días)
Ebadur
Ebadur el 18 de Jul. de 2014
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
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.

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 18 de Jul. de 2014
Editada: Azzi Abdelmalek el 18 de Jul. de 2014
out=regexp(sprintf('AAA BBB %d,',1:10),',','split')
out(end)=[]
%or
str='AAA BBB'
out=genvarname(repmat({str},11,1))
out(1)=[]
  1 comentario
Ebadur
Ebadur el 18 de Jul. de 2014
Can I send you a personal email if you dont mind?

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by