Changing file name in Matlab

I nave a file named wflux_23.25_86.75.I have to change the name of the file as data_23.25_86.75.How can we do this in Matlab.

Respuestas (1)

Mischa Kim
Mischa Kim el 19 de Jun. de 2015

0 votos

Tanmoyee, use the strrep command
str = 'wflux_23.25_86.75';
str_new = strrep(str, 'wflux', 'data')
str_new =
data_23.25_86.75

2 comentarios

Tanmoyee Bhattacharya
Tanmoyee Bhattacharya el 19 de Jun. de 2015
Thanks for reply.It works
Tanmoyee Bhattacharya
Tanmoyee Bhattacharya el 19 de Jun. de 2015
If I have 100 files in a folder by name wflux_23.25_86.75 and I have to change the name of the files in that folder by data_23.25_86.75 what I have to do?

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 19 de Jun. de 2015

Comentada:

el 19 de Jun. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by