function name as a variable
古いコメントを表示
Is it possible to do the following?
variablefun.m
function variablefun(fun)
fun
function fun1
end
function fun2
end
end
command window
variablefun(fun1)
variablefun(fun2)
2 件のコメント
Stephen23
2025 年 3 月 31 日
No, but you could write a class and define FUN1 & FUN2 as its methods.
feynman feynman
2025 年 3 月 31 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!