replace all same strings in m-file to another string
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Leotsing
el 20 de Jun. de 2016
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/154177/image.jpeg)
I have a A.m file. In this file,all variables are 'xx_*'. Now ,I want to create a B.m which has same variables to A.m ,but xx has been changed to xx_1
-- thanks to everyone answer or view this question.
2 comentarios
Stephen23
el 20 de Jun. de 2016
Editada: Stephen23
el 20 de Jun. de 2016
As an alternative to changing the variable names, just turn the script into a function, then this entire question becomes irrelevant:
Also note that an Mfile is just a text file, so you can use the find-and-replace feature of your favorite text editor.
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Environment and Settings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!