Question: Create a script file called HW4.m and save it. The script file will do the following: 1- Declare a vector called t that starts at

Create a script file called HW4.m and save it. The script file will do the following: 1- Declare a vector called t that starts at 0 and ends at 2 with step size of 0.001. 2- Declare a function f1 such that it is mathematically expressed as f(t) = 0.5t^2 3- On a new figure, plot f1 verses t. Add a grid to the graph and label the x-axis as 'Time' and y-axis as 'Acceleration' 4- Declare a new function f2 such that it is mathematically expressed as f(t) = 2exp(-t) 5- Declare a new function f3 such that it mathematically expressed as f(t) = t^2 times exp(-t) 6- On a new figure, break the figure into four sub-windows (2 times 2). Such that a. On the first sub window plot f1 verses t. Add a grid to the graph and label the x-axis as 'Time' and y-axis as 'Acceleration' b. On the second sub window plot f2 verses t. Add a grid to the graph and label the x-axis as 'Time' and y-axis as 'Acceleration' c. On the third sub window plot f3 verses t. Add a grid to the graph and label the x-axis as 'Time' and y-axis as 'Acceleration' d. On the forth sub window plot f1 verses t, f2 verses t and f3 verses t on the same graph. Add a grid to the graph and label the x-axis as 'Time' and y-axis as 'acceleration
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
