Anonymous Functions in another anonymous function

20 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Function Handles 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by