Functional Operands

If either of A and B is a function, A + B or A - B will be a new function. For example
>> f = sin + cos;
   f(pi / 4)
        0 
>> h = x -> sqrt(x^2 + 1);
>> h1 = f + h;   
>> h1(0)
   2

>> g = 2 - sin;
>> g(pi/2)
   2.141592654
Note that the definition of g is instead of . Therefore .



oz 2009-12-22