Is it possible to declare a anonymous function globally?
古いコメントを表示
Hello,
I have a main script-file and various subfunctions (in separate files). In the main script I have declared some anonymous functions like this (but more complex):
test = @(x, y) x * y - x;
test(5, 6)
= 25
How can I globalize these anonymous functions to use them within my separate subfunction-files?
Right now I have to setup all the anonymous functions in each subfunction-file again and again but whenever I adjust one of the anonymous functions, I have to do this for every file. This is quite annoying.
Thank you!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!