Function A Save e Reset MATLAB Documentation lear te 1 Modify the function header below 2 function CHANGE_THIS_HEADER 3 YOUR CODE STARTS 4 5 YOUR CODE ENDS end Code to call your function creen Sh 0-0...08.3 Reset ErootConditioni, rootValues 1) = quadraticsolver(12 -4 -51) creen Shol 5.0...40.59 Acreen Shot 3-0...50.08 A Previous Na ATT Is rootCondition output correct for the example input (2-4-5]? 0% (13%) 0% (13%) Is rootValues output correct for the example input (2-4-5]? Be sure the two roots are sorted in ascending order in the output vector Is rootCondition output correct for complex roots? 0% (13%) Is rootCondition output correct for indistinct (repeated) roots ? 0% (13%) 0% (12%) Is rootValues output correct for complex roots? Check spelling and capitalization of the output text string for this case, It must be exactly as specified in the problem statement Is rootValues output correct for indistinct (repeated) roots? 0% (12%) 0% (12%) Are both outputs correct for randomly generated coefficients (unknown root condition)? Previous Next le atv S Problem If a second order polynomial is written in the general form: ax+bx+co then the roots (.e. the values of x that satisty the equation) can be determined using the quadratic formula: -b + V6 - 4ac 2a You will be given a 3-element row vector (a, b, c) as an input. The goal is to write a function that does the following: 1. Check if the roots of the polynomial defined by a, b, and e are real and distinct. Note that the roots will be real if the value under the square root is greater than or equal to zero. They will not be distinct, however, if the value under the square root is exactly equal to zero. Assign an an integer (uinta datatype) value to the output variable rootCondition (you may choose a different name) as follows: The value 2 if the roots are real and distinct The value 1 it the two roots are the same. I The value of the roots are not real (ie complex because the value under the square root is less than o) 2. Assign the solution to the quadratic to the output variable rootValues (you may choose a different name) according to the following guidelines: . In cases where there are two real and distinct roots, compute the two roots and assign them in ascending order to a two-element row vector. In cases where the two roots are the same, compute the root and assign this value to both elements in a two-element row vector . In cases where the roots are complex, output assign the text complex roots' output variable rootValues. Next Previous stv W . In cases where the roots are complex output assign the text 'complex roots' output variable rootValues. Task 1 Write a function quadraticSolver that takes one 3-element array input and returns two outputs (root condition and root values) Use an if-elseif-else structure in your code