Develop a function function M-file that returns the difference between the passed functions maximum and minimum value
Question:
Develop a function function M-file that returns the difference between the passed function’s maximum and minimum value given a range of the independent variable. In addition, have the function generate a plot of the function for the range. Test it for the following cases:
(a) f(t) = 8e−0.25tsin(t − 2) from t = 0 to 6π.
(b) f(x) = e4xsin(1/x) from x = 0.01 to 0.2.
(c) The built-in humps function from x = 0 to 2.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Applied Numerical Methods With MATLAB For Engineers And Scientists
ISBN: 9781259027437
3rd Edition
Authors: Steven C. Chapra
Question Posted: