Adding functions of the same variable to form a new function

30 次查看(过去 30 天)
Basically. Say I have two functions like:
f1= @(x)(43*(x^3)+32)
f2 = @(x) (34+9*x - 2*(x^2))
How do I combinde these functions together in matlab
f3= f1+f2
does not do it.

采纳的回答

Stephen23
Stephen23 2017-12-15
编辑:Stephen23 2017-12-15
To add normal MATLAB functions simply define a new function:
f3 = @(x) f1(x) + f2(x);
  1 个评论
Guster
Guster 2017-12-15
编辑:Guster 2017-12-15
Thanks, I couldnt Google it since I didnt know the name was actually function_handle

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Google 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by