Question: USE MATLAB! Use MATLAB! QUESTION 2: [35] A quadratic equation of the following form can be either concave upward or concave downward. When it is

USE MATLAB!

USE MATLAB! Use MATLAB! QUESTION 2: [35] A quadratic equation of the

following form can be either concave upward or concave downward. When it

Use MATLAB!

QUESTION 2: [35] A quadratic equation of the following form can be either concave upward or concave downward. When it is concave upward, a local minimum exists. When the quadratic equation is concave downward, a local maximum exists. f(x)= ax? +bx+c Using the principle of differentiation, write a local function quadmaxmin that will print out the local minimum or local maximum of a quadratic equation. The function will accept a vector that consists of the coefficients of a quadratic equation (i.e. [a b c]). The function will also display an error message if the input vector does not represent the coefficients of a quadratic function. Example 1: quadmaxmin([1 2 4]) will return the following: >> the local minimum is: (-1.00, 3.00) Example 2: quadmaxmin([-1 -2 4 0]) will return the following: >> Error: please enter a vector with 3 elements To verify that the above outputs are correct, plot the original quadratic function and observe the critical points (i.e. the local maximum or local minimum). Start with the function header below: function quadmaxmin (x) (write a local function "quadmaxmin.m and test it with Example 1 and Example 2)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!