MATLAB: Write a program in a script file that determines the real roots of a quadratic equation

quadratic equationquadroots

Howdy, I am new to math lab and need a little help The question asks: "Write a program in a script file that determines the real roots of a quadratic equation ax^2+bx+c=0. Name the file quadroots. When the file runs, it asks the user to input values of the constants a,b, and c. To calculate the roots of the equation the program calculates the discriminant D, given by D=b^2-4ac."
Then it goes on to give me specific equations and what Matlab is actually doing
I don't know what commands to use, and any help would be appreciated, thanks

Best Answer

If you are beginning, this is a good resource. It is a MATLAB tutorial and will help you solve quadratic equations with MATLAB.