Suppose f and g are function_handles, try to define f+g,f-g,f*g and f/g.
e.g. if f = @(x)x and g = @(x)x+1 then f+g = @(x)2*x+1 f-g = @(x)-1 f*g = @(x)x*(x+1) f/g = @(x)x/(x+1)
brilliant solution! I used 'switch...case...' structure to judge 'type'.
5697 Solvers
Read a column of numbers and interpolate missing data
795 Solvers
91 Solvers
Implement a bubble sort technique and output the number of swaps required
81 Solvers
Chebyshev polynomials of the 2nd Kind
39 Solvers
Solution 696726
hardly read it.Never thought a function_handle can be created like this.