Function Exercises in MATLAB





1)  Create a function file for y = 2x + ex and use it to compute y(3)
 

2) Create a function file for z = 2e-t + 3 e-4t and use it to compute z(.5) and z(1.5)
 

3) Create a function file for x = 50e-2t - 75 t log(2t) and use it to compute x(1.0), x(1.1), x(1.2) ..., x(3.0)
 

4) Create a script file that can produce a plot of y = 2x + ex on the domain -1 <= x <= 1.  Use your function file from step 1.
    For the best effect, the script file should ask the user for the endpoints of the domain (-1 and 1 in this case).
 

5) Repeat step 4 for the function z = 2e-t + 3 e-4t