replace all same strings in m-file to another string

5 ビュー (過去 30 日間)
Leotsing
Leotsing 2016 年 6 月 20 日
編集済み: Stephen23 2016 年 6 月 20 日
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 件のコメント
Stephen23
Stephen23 2016 年 6 月 20 日
編集済み: Stephen23 2016 年 6 月 20 日
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.
Leotsing
Leotsing 2016 年 6 月 20 日

サインインしてコメントする。

採用された回答

Leotsing
Leotsing 2016 年 6 月 20 日

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by