Question: Develop a function function M-file that returns the difference between the passed functions maximum and minimum value given a range of the independent variable. In
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.
Step by Step Solution
3.46 Rating (162 Votes )
There are 3 Steps involved in it
Here is a possible implementation of the function in MATLAB function diff plothandle maxmindifferenc... View full answer
Get step-by-step solutions from verified subject matter experts
