How to change string name?
古いコメントを表示
Hey!
I have a function e.g. y=a*x.
How can I change later string name of y to y306 or sth like that?
4 件のコメント
TADA
2019 年 1 月 13 日
How can I change later string name of y to y306
do you mean change the name of your variable from y to y306?
Stephen23
2019 年 1 月 13 日
"How can I change later string name of y to y306 or sth like that?"
Dynamically changing variable names is one way that beginners force themselves into writing slow, complex, buggy code that is hard to debug. Read this to know why:
Rather than forcing a pseudo-index into a variable name, you should use a real index with one array, or perhaps a structure or a table.
Elzbieta Trynkiewicz
2019 年 1 月 13 日
Stephen23
2019 年 1 月 13 日
"I tried to load multiple data which was previously saved like a 'y'; but all of these, despite the different external filename, they have the same name of "internal" variable and they are overwriting."
Aaah, that is an entirely different question to what you asked about: http://xyproblem.info/
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!