Change variable name across code lines
Show older comments
I have a long that consists of over 600 lines, I have a variable “a” that I use a lot in my code and I would like to change its name to variable app.a to use in app designer however using the replace all feature changes all occurances of “a” even the ones in my comments or in other words in my code
Accepted Answer
More Answers (1)
John D'Errico
on 28 Nov 2023
0 votes
Use find and replace.
It will search for the next occurence of a. Then you click on either replace, or to ignore that occurence of a, and go on to the next occurrence.
You won't find something simpler, and you will find that by the time you are done, it did not take too long.
Categories
Find more on Whos in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!