I was given the task to develop a 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, I have to make the function generate a plot of the function for range. I was given three instances to test my M-file.
a.) f(t) = 8e^(-0.25t)sin(t – 2) , from t=0 to 6pi
b.) f(x) = e^(4x)sin(1/x) , from x =0.01 to 0.02
c.) The built in humps function from x = 0 to 2
I found the exact problem on Chegg, but it provides absolutely no explanation of the code and I would really like to be able to understand this problem. I hope someone can help!
Best Answer