0% found this document useful (0 votes)
2 views6 pages

Experiment - 3 Objective: Date - 18/09/2024

Uploaded by

230105015
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

Experiment - 3 Objective: Date - 18/09/2024

Uploaded by

230105015
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Date – 18/09/2024

EXPERIMENT - 3
Objective – To determine roots of given polynomial equation using
MATLAB.

SOFTWARE REQURIED:-
1. MATLAB R2010a.
2. Windows 11.

THEORY:-

Polynomials are equations of a single variable with nonnegative integer exponents.


MATLAB represents polynomials with numeric vectors containing the polynomial
coefficients ordered by descending power.

r = roots(p) returns the roots of the polynomial represented by the coefficients in p as a column
vector r. Input p is a vector containing n+1 polynomial coefficients, starting with the
coefficient of xn. For example, p = [3 2 -2] represents the polynomial 3x2+2x−2. A coefficient
of 0 indicates an intermediate power that is not present in the equation.

The roots function solves polynomial equations of the form p1x n+...+pnx+pn+1=0.
Polynomial equations contain a single variable with nonnegative exponents.

Aryan Sharma (230105015)


Given polynomial:- 9x3 -5x2 + 3x + 7

Calculations:

Aryan Sharma (230105015)


Output:-

Aryan Sharma (230105015)


Given polynomial:- x 4 + 1

Calculations:

Aryan Sharma (230105015)


Output:-

Aryan Sharma (230105015)


Result:-
The roots of given polynomial 9x3 -5x2 + 3x + 7 are
The roots of given polynomial x 4 + 1 are

PRECAUTIONS:-

 Never use the M-file name in the MATLAB function or command and vice versa.
 Never use the number before file name.
 Never use blank space in file name.

Aryan Sharma (230105015)

You might also like