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!