how to increase the function numbers
4 ビュー (過去 30 日間)
古いコメントを表示
I have function called "editwin",,,now i want to increase the functions dynamically like"editwin1","editwin2","editwin3","editwin4","editwin5","editwin6",,only names should change dynamically
1 件のコメント
Azzi Abdelmalek
2013 年 2 月 5 日
If you have just one function, what is your goal in changing the name of this function?
回答 (1 件)
Jan
2013 年 2 月 5 日
No, please do not do this. Inserting an index in a name is always a bad idea.
Please explain what you actually want to achieve. Perhaps this helps, but usually the are better solutions:
for counter = 1:6
fcn = str2func(sprintf('editwin%d', counter))
feval(fcn) % for example
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!