Filter löschen
Filter löschen

replace all same strings in m-file to another string

4 Ansichten (letzte 30 Tage)
Leotsing
Leotsing am 20 Jun. 2016
Bearbeitet: Stephen23 am 20 Jun. 2016
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 Kommentare
Stephen23
Stephen23 am 20 Jun. 2016
Bearbeitet: Stephen23 am 20 Jun. 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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Leotsing
Leotsing am 20 Jun. 2016

Weitere Antworten (0)

Kategorien

Mehr zu Characters and Strings finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by