![]() |
VOOZH | about |
A polynomial is an expression that is made up of variables, constants, and exponents, that are combined using mathematical operations such as addition, subtraction, multiplication, and division (No division operation by a variable). Polynomials in MATLAB are represented as row of a vector containing coefficients ordered by descending powers.
For example, the equation G(x) = 2x4 + 3x3 - 4x + 1 could be represented as gfg = [2 3 -4 1]. For evaluating Polynomials we use function polyval( ), It evaluates the polynomial gfg at each point in x.
Example 1:
Output:
Example 2:
Output:
Example 3:
Output: