Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MATLAB If a second order polynomial is written in the general form: ax2+bx+c=0 then the roots (i.e. the values of x that satisfy the equation)
MATLAB
If a second order polynomial is written in the general form: ax2+bx+c=0 then the roots (i.e. the values of x that satisfy the equation) can be determined using the quadratic formula: x=2abb24ac Code has already been provided to define a function named quadratiesolver that accepts the three variables a, b, and c that define a quadratic polynomial as inputs. The provided function command defines two output variables: RootFromplus and RootFromMinus. Write commands to determine the values of the two roots of this polynomial and assign those values to the output variables. Assign the result using addition to the variable RootFromplus and assign the result using subtraction to the variable RootFromMinus. Note the values of the variables a,b, and c are supplied to the function when it is run by MATLAB grader. Be sure not to overwrite these values in your code. Function 0 function [RootFromplus, RootFromMinus] = quadraticSolver (a,b,c) \%Enter commands in the space below to evaluate the expression and assign the results \%to the output variables defined in the function command in line 1Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started