Answered step by step
Verified Expert Solution
Link Copied!

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)

image text in transcribedMATLAB

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 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Systems Analysis And Synthesis Bridging Computer Science And Information Technology

Authors: Barry Dwyer

1st Edition

0128054492, 9780128054499

More Books

Students also viewed these Databases questions

Question

How does internal auditing differ from external auditing?

Answered: 1 week ago

Question

Tell the merits and demerits of Mendeleev's periodic table.

Answered: 1 week ago