Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A second-order algebraic equation: ax2 + bx+c=0 Has the following solution (roots): -b + vb2 - 4ac 2 a = 0,0 0, a = 0,6

image text in transcribed

A second-order algebraic equation: ax2 + bx+c=0 Has the following solution (roots): -b + vb2 - 4ac 2 a = 0,0 0, a = 0,6 = 0,c70 c a = 0,b= 0,C = 0 Where - there is no solution, and C - any complex number is a solution. 20 X= a Things you must do: Create a function in MATLAB named: function x = solveeg(a,b,c) that finds the solution for x based on different input values for a, b, and c. Use if-else statements to solve the problem. Save the code for your function into a file named: solveeq.m Test the function from the MATLAB command window to make sure it works as expected, e.g: >> solveeg(1, -5, 6) >>> solveeg(1, 1, 2) ans = ans = 3 2 -0.5000 + 1.32291 -0.5000 - 1.32291 >> solveega, 0, 1) No solution >> solveeg(0, 0, 0) Any complex number is a solution

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

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions