Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The roots of a quadratic function ax + bx + c = 0 can be calculated using the quadratic formula 1,2 -bb2-4ac 2a The

The roots of a quadratic function ax + bx + c = 0 can be calculated using the quadratic formula 1,2 -bb2-4ac 2a The discriminant of the formula, b2-4ac, indicates whether the roots are real or imaginary. a. Write a function in MATLAB to calculate the discriminant. What are the inputs it needs? What is the desired output from the function? b. Write a function in MATLAB that calculates the roots of a quadratic function given a, b, and c as inputs to the function. What is the desired output of the function? The function to calculate the roots will call the function to calculate the discriminant that you have written and use the result from that function to calculate the roots. Test your function by using the following sets of coefficients. (a, b, c) (2, 10, 12) (a, b, c) = (1,0,1) 2x+10x+12 0 x+1=0 Submit your .m files and the contents of the Command Window to Blackboard.

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

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions

Question

Explain the ways that ROI can be improved.

Answered: 1 week ago

Question

Copy and complete the statement. 3800 m ? km =

Answered: 1 week ago