Anonymous Functions in another anonymous function

19 ビュー (過去 30 日間)
Andy Tran
Andy Tran 2020 年 6 月 6 日
回答済み: madhan ravi 2020 年 6 月 6 日
I'm working with function handle and i want to generate a function by combining others functions like below:
f1 = @(x) x(1)/(1+x(2));
f2 = @(x) x(2)/(1+x(1));
f3 = @(x) f1 + f2
Of course it doesn't work, can somebody show me the way how to do it?
Many thanks!

採用された回答

madhan ravi
madhan ravi 2020 年 6 月 6 日
f3 = @(x) f1(x) + f2(x)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeFunction Handles についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by