Question: using Matlab solve for the following question Given the function f(x) below, use for loops and if statements to perform the following exercises. F(x) =
using Matlab solve for the following question

Given the function f(x) below, use for loops and if statements to perform the following exercises. F(x) = cos(1.2x)exp[-(x/8)^4] (a, b) Compute f(x) for x = [-20:0.1:20]. Put x into p1a and f into p1b. (c - e) How many local maxima does f(x) have (excluding the end values of f)? Put the answer in p1c. Find the x values and f values of the maxima and put the answers in p1d and p1e, respectively. List the maxima in the order of increasing x. (f - h) How many local minima does f(x) have (excluding the end values of f)? Put the answer in p1f. Find the x values and f values of the minima and put the answers in p1g and p1h, respectively. List the minima in the order of increasing x. (i - k) How many times does f(x) cross zero value? Put the answer in p1i. Find the x values and f values right before f(x) crosses zero value and put the answers in p1j and p1k, respectively. List the zero crossing in the order of increasing x. Make figure 1 to include a solid line for f(x) and different symbols for the maxima, the minima and the zero crossing. Label the axes and give title and legend. Set p1l = 'See figure 1'. Make sure that the figure is plotted on screen when your homework script is executed. Given the function f(x) below, use for loops and if statements to perform the following exercises. F(x) = cos(1.2x)exp[-(x/8)^4] (a, b) Compute f(x) for x = [-20:0.1:20]. Put x into p1a and f into p1b. (c - e) How many local maxima does f(x) have (excluding the end values of f)? Put the answer in p1c. Find the x values and f values of the maxima and put the answers in p1d and p1e, respectively. List the maxima in the order of increasing x. (f - h) How many local minima does f(x) have (excluding the end values of f)? Put the answer in p1f. Find the x values and f values of the minima and put the answers in p1g and p1h, respectively. List the minima in the order of increasing x. (i - k) How many times does f(x) cross zero value? Put the answer in p1i. Find the x values and f values right before f(x) crosses zero value and put the answers in p1j and p1k, respectively. List the zero crossing in the order of increasing x. Make figure 1 to include a solid line for f(x) and different symbols for the maxima, the minima and the zero crossing. Label the axes and give title and legend. Set p1l = 'See figure 1'. Make sure that the figure is plotted on screen when your homework script is executed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
