% Problems with computer projectors turned this % lecture into an exercise session. % We illustrated the use of functions in functions % with the Trapezoidal Rule, implemented by the % function traprule: help traprule % see comments The function t = traprule(f,a,b) returns in t the application of the Trapezoidal Rule to approximate the definite integral of f over [a,b]. Example: t = traprule('sin',0,1) % integral of sin(x) over [0,1] t = traprule('sin',0,1) % use it t = 0.4207 diary off