Call an array by a string
3 次查看(过去 30 天)
显示 更早的评论
Hello,
in my code i need to call the array [0,0,1] by the string 'cup1' how can i do that?
Thank you so much!!
1 个评论
Guillaume
2016-10-24
It's not very clear what you're trying to do, particularly the motivation. I assume you're not asking for
cup1 = [0, 0, 1];
Hopefully, you're not asking how to name your variable dynamically as it's a very bad idea. Again, explain what you want to do and more importantly why.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!