Tag: MATLAB roots function

1 articles found.

Roots of Quadratic Equations in MATLAB

MATLAB logo, colored mathematical surface, blue and orange graphic, white background

Hello friends! In this tutorial, we will find the roots of a quadratic equation in MATLAB, calculate its minimum over a specified interval and display the results on a graph. This is a useful beginner project because it connects algebra, functions, input validation and plotting in one small program. The original project allowed you to choose roots, a minimum or both. We will keep that idea, but make the calculations more reliable. In particular, we will distinguish a function's roots from its minimum, account for interval boundaries and handle inputs that turn out to be linear or constant. You do not need Symbolic Math Toolbox for the numerical program below. We will use ordinary MATLAB arrays, roots , polyval and a little calculus. Figure: MATLAB is used to calculate the polynomial roots ...