Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE MATLAB: % Don't change the variable names % Part A a = 2 ; b = 8 ; c = 8 x a =

USE MATLAB:
% Don't change the variable names
%Part A
a=2;b=8;c=8
xa=% Use variable 'xa' for one real root
1a=% Use variables '1a' and '2a' for 2 distinct roots
2a=
%Part B
a=-5;b=3;c=-4
xb= oUse variable 'xb' for one real root
x1b=% Use variables '1b' and '2b' for 2 distinct roots
x2b=
poPart C
a=-2;b=7;c=4
xc=% Use variable 'xc' for one real root
x1c=% Use variables 'x1c' and '2c' for 2 distinct roots
x2c=Write a program that determines the real roots of a quadratic equation. To calculate the roots of the equation the program calculates the discriminant D, given by: D=b2-4ac.
If D>0, the program displays message "The equation has two roots," and the roots are displayed in the next line.
If D=0, the program displays message "The equation has one root," and the root is displayed in the next line.
If D0, the program displays message "The equation has no real roots."
Run the program to obtain solutions to the following three equations:
a)2x2+8x+8=0
b)-5x2+3x-4=0
c)-2x2+7x+4=0
image text in transcribed

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

Data And Information Quality Dimensions, Principles And Techniques

Authors: Carlo Batini, Monica Scannapieco

1st Edition

3319241060, 9783319241067

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago