replace all same strings in m-file to another string

조회 수: 8 (최근 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일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by