MATLAB: HOW TO Summation of Functions

functionssummation

Hi. How can i add one functions to another? For example:
fun1 = @(x)100*(x(2) - x(1)^2)^2 + (1 - x(1))^2;
fun2 = @(x)50*(x(2) - x(1)^2)^2 + (3 - x(1))^2;
fun3 = fun1+fun2;

Best Answer

fun3 = @(x) fun1(x) + fun2(x)
Related Question