Change workspace variable name

Hello,
I have lot of workspace variables for a Simulink project and I would like to rename all of them in a Matlab script. I know how to retrieve the variable contents but I don't know how to rename the variable. Could you help me?

 采纳的回答

If you want to rename A to B
B=A
clear A

3 个评论

thanks, it works with hws.evalin([B '=' A])
Why evalin? while B=A is simple
With only B=A, the variables deals with the Base Workspace, not with the model workspace.

请先登录,再进行评论。

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Simulink Environment Customization 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by