Consider the piece wise function
F(t) = {t^2e^2. -8<=t<=-2 2t+1. -2<t<=4 Cos(3t)sin(6t). 4<t<=8
Write a matlab script that calculates f(t) for any supplies legal value for t, and plot the function over the interval [-8,8] if the user chooses to.
Requirements:
- – the user must supply the value of t at which the function is evaluated
- – script must generate an error message if the value of t is outside the interval [-8,8]
- – calculated f value must be displayed using 3 digits after decimal point
Best Answer