Use MATLAB
Write a function to convert an imperial measurement (in feet and inches) to a metric measurement (in meters). The program will ask the user to input the measurement in feet and inches. The program will then calculate and convert the input to meters.
You should be familiar with the following formula for finding the roots of a quadratic equation:
√(b^2 - 4ac) / 2a
The term under the square root is called the discriminant and can be used to determine the type of roots the quadratic equation has.
If the discriminant is positive, then the polynomial has two real roots. If the discriminant is zero, then the polynomial has one repeated root. Otherwise, if the discriminant is negative, the polynomial has two complex roots.
Sample Output:
TestQuadraticRoots Function - Finding the number of roots for ax^2.
Enter the coefficient a:
Enter the coefficient b:
Enter the coefficient c:
The equation has real roots.