如何将字符串转换成矩阵名称。
Show older comments
str_var = 'var1';
eval( [str_var, '= 10']);
这样得到的结果是var1=10。如何让var1等于一个指定的矩阵,而不是一个数。
Accepted Answer
More Answers (0)
Categories
Find more on MATLAB 快速入门 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!