Add suffix to name of all variables in workspace

15 ビュー (過去 30 日間)
Inna Pelloso
Inna Pelloso 2023 年 2 月 2 日
回答済み: Steven Lord 2023 年 2 月 2 日
Hi,
Is there a way to add a suffix to the end of the names of every variable in the work space? (i.e. i have variables a,b, and c, and want to have a_test = a; b_test = b; and c_test = c. I have too many variables to do this one by one. Any help would be appreciated.
Thank you!
IP

採用された回答

Steven Lord
Steven Lord 2023 年 2 月 2 日
Can you dynamically create variables with patterned names like a_test, b_test, c_test, etc.? Yes.
Should you do this? The general consensus is no. That Answers post explains why this is generally discouraged and offers several alternative approaches.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by