How to summon a function that it's name was stored in a string?
1 回表示 (過去 30 日間)
古いコメントを表示
During my program ,I want to summon a function that it's name was previously saved in a string variable ! How can I do it?
0 件のコメント
採用された回答
Walter Roberson
2011 年 10 月 23 日
It is better to avoid doing such things if you can. Consider instead storing function handles, or using str2func.
What you are asking for is possible (and not syntactically difficult), but it gets misused much much more often than it gets used properly.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で String についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!