Anonymous Functions in another anonymous function

조회 수: 24 (최근 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 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