sum two functions together

Hi,
I wanna sum two (or more) functions together, like image below.
What efficient way do you recommend?
Thank you.

4 Comments

USe Sum.
Amir
Amir on 28 Jun 2019
Edited: Amir on 28 Jun 2019
Each function define in its domain!
First function: from a to d,
Second function: from c to f,
Third function: from b to e.
fun1 = @(x)...;
fun2 = @(x)...;
fun3 = @(x)...;
fun_sum = @(x) fun1(x) + fun2(x) + fun3(x);
Thank you Torsten, It worked well.

Sign in to comment.

Answers (0)

Categories

Find more on Just for fun in Help Center and File Exchange

Asked:

on 28 Jun 2019

Commented:

on 28 Jun 2019

Community Treasure Hunt

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

Start Hunting!