ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
POLYNOMIALS, CURVE FITTING, AND
INTERPOLATION
POLYNOMIALS
o Polynomials are mathematical expressions that are frequently
used for problem solving and modeling in science and
engineering
o In many cases an equation that is written in the process of
solving a problem is a polynomial, and the solution of the
problem is the zero of the polynomial
o MATLAB has a wide selection of functions that are specifically
designed for handling polynomials
Cont.. .
o Polynomials are functions that have the form:
o The coefficients and are real numbers, and n which is a non-
negative integer, is the degree, or order, of the polynomial
o In MATLAB, polynomials are represented by a row vector in
which the elements are the coefficients and
+
Cont.. .
o The first element is the coefficient of the x with the highest
power
o The vector has to include all the coefficients, including the ones
that are equal to 0
Example:
Equation MATLAB Form
MATLAB Representation [ 5,0,0,6,7,0]
Value of Polynomials
o The value of a polynomial at a point x can be calculated with the
function polyval
• p - is a vector with the coefficients of the polynomial
• x - is a number, or a variable that has an assigned value, or a
computable expression
• x - can also be a vector or a matrix
polyval(p,x)
Example
For the polynomial
+
a. Calculate f(9)
b. Plot the polynomial for
Roots of a Polynomial
o The roots of a polynomial are the values of the argument for
which the value of the polynomial is equal to zero
o MATLAB has a function, called roots, that determines the root,
or roots, of a polynomial
• r - is a column vector with the roots of the polynomial
• p - is a row vector with the coefficients of the polynomial
r = roots(p)
Cont.. .
o When the roots of a polynomial are known, the poly command
can be used for determining the coefficients of the polynomial
• p - is a row vector with the coefficients of the polynomial
• r - is a vector (row or column) with the roots of the
polynomial
p = poly(r)
Example
For the polynomial
+
a. Find the roots
b. From ‘a’ above find the coefficients
Addition, Multiplication, and Division
Addition
» Two polynomials can be added (or subtracted) by adding
(subtracting) the vectors of the coefficients
» If the polynomials are not of the same order (which means that
the vectors of the coefficients are not of the same length), the
shorter vector has to be modified to be of the same length as the
longer vector by adding zeros (called padding) in front
Multiplication
» Two polynomials can be multiplied using the MATLAB built-in
function conv
• c - is a vector of the coefficients of the polynomial that is the
product of the multiplication
• a and b - are the vectors of the coefficients of the
polynomials that are being multiplied
» The two polynomials do not have to be of the same order
c = conv(a,b)
Division
» A polynomial can be divided by another polynomial with the
MATLAB built-in function deconv
• q - vector with the coefficients of the quotient polynomial.
• r - vector with the coefficients of the remainder polynomial
• u - vector with the coefficients of the numerator polynomial
• v - vector with the coefficients of the denominator polynomial
[q,r] = deconv(a,b)
Example
For the polynomial
and
a. Add
b. Subtract
c. Multiply
d. Divide
Derivatives of Polynomials
o The built-in function polyder can be used to calculate the
derivative of a single polynomial, a product of two polynomials,
or a quotient of two polynomials
1. k = polyder(p)
Derivative of a single polynomial. p is a vector with the
coefficients of the polynomial
k - is a vector with the coefficients of the polynomial that is the
derivative
Cont.. .
2. k = polyder(a,b)
Derivative of a product of two polynomials
a and b - vectors with the coefficients of the polynomials that
are multiplied
k - is a vector with the coefficients of the polynomial that is the
derivative of the product
Cont.. .
3. [n d]= polyder(u,v)
Derivative of a quotient of two polynomials
u and v - vectors with the coefficients of the numerator and
denominator polynomials
n and d - vectors with the coefficients of the numerator and
denominator polynomials in the quotient that is the derivative
Cont.. .
o The only difference between the last two commands is the
number of output argument
o With two output arguments MATLAB calculates the derivative
of the quotient of two polynomials
o With one output argument, the derivative is of the product.
Example
For the polynomial and find the derivative of
a.

More Related Content

Similar to 8_Polynomials, Curve Fitting & Interpolation.pptx (20)

L16
L16L16
L16
FALLEE31188
Ìý
Vector space introduction
Vector space introductionVector space introduction
Vector space introduction
ROHAN GAIKWAD
Ìý
Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational Calculus
Amiya9439793168
Ìý
Quadratic functions
Quadratic functionsQuadratic functions
Quadratic functions
ACdeGuzman30
Ìý
Discrete Structure-lecture-5 the no.pptx
Discrete Structure-lecture-5 the no.pptxDiscrete Structure-lecture-5 the no.pptx
Discrete Structure-lecture-5 the no.pptx
Osman Mohyud Din
Ìý
Lecture 3 - Introduction to Interpolation
Lecture 3 - Introduction to InterpolationLecture 3 - Introduction to Interpolation
Lecture 3 - Introduction to Interpolation
Eric Cochran
Ìý
Advance algebra
Advance algebraAdvance algebra
Advance algebra
lyra matalubos
Ìý
SOLVING RATIONAL RATIONAL FUNCTIONS.pptx
SOLVING RATIONAL RATIONAL FUNCTIONS.pptxSOLVING RATIONAL RATIONAL FUNCTIONS.pptx
SOLVING RATIONAL RATIONAL FUNCTIONS.pptx
SinamarLaroyaRefuerz
Ìý
Function
Function Function
Function
QamarAbbasJaffari
Ìý
Bisection method
Bisection methodBisection method
Bisection method
Tirth Parmar
Ìý
Project PPT slides_student_id#104519347
Project PPT slides_student_id#104519347Project PPT slides_student_id#104519347
Project PPT slides_student_id#104519347
savan Darji
Ìý
Formal methods 5 - Pi calculus
Formal methods   5 - Pi calculusFormal methods   5 - Pi calculus
Formal methods 5 - Pi calculus
Vlad Patryshev
Ìý
14th Athens Colloquium on Algorithms and Complexity (ACAC19)
14th Athens Colloquium on Algorithms and Complexity (ACAC19)14th Athens Colloquium on Algorithms and Complexity (ACAC19)
14th Athens Colloquium on Algorithms and Complexity (ACAC19)
Apostolos Chalkis
Ìý
Vectors of Bachelors of computer science
Vectors of Bachelors of computer scienceVectors of Bachelors of computer science
Vectors of Bachelors of computer science
legendgamingnp
Ìý
Chapter 5 Polynomials
Chapter 5 PolynomialsChapter 5 Polynomials
Chapter 5 Polynomials
Reema
Ìý
Linear Size Meshes
Linear Size MeshesLinear Size Meshes
Linear Size Meshes
Don Sheehy
Ìý
Mathematics power point presenttation on the topic
Mathematics power point presenttation on the topicMathematics power point presenttation on the topic
Mathematics power point presenttation on the topic
Meghansh Gautam
Ìý
Polynomial Functions.pdf
Polynomial Functions.pdfPolynomial Functions.pdf
Polynomial Functions.pdf
MarkReyLlabres1
Ìý
Zeroes and roots
Zeroes and rootsZeroes and roots
Zeroes and roots
Nandeesh Laxetty
Ìý
Ppt on polynomial
Ppt on polynomial Ppt on polynomial
Ppt on polynomial
Prakash Thapliyal
Ìý
Vector space introduction
Vector space introductionVector space introduction
Vector space introduction
ROHAN GAIKWAD
Ìý
Dbms 14: Relational Calculus
Dbms 14: Relational CalculusDbms 14: Relational Calculus
Dbms 14: Relational Calculus
Amiya9439793168
Ìý
Quadratic functions
Quadratic functionsQuadratic functions
Quadratic functions
ACdeGuzman30
Ìý
Discrete Structure-lecture-5 the no.pptx
Discrete Structure-lecture-5 the no.pptxDiscrete Structure-lecture-5 the no.pptx
Discrete Structure-lecture-5 the no.pptx
Osman Mohyud Din
Ìý
Lecture 3 - Introduction to Interpolation
Lecture 3 - Introduction to InterpolationLecture 3 - Introduction to Interpolation
Lecture 3 - Introduction to Interpolation
Eric Cochran
Ìý
SOLVING RATIONAL RATIONAL FUNCTIONS.pptx
SOLVING RATIONAL RATIONAL FUNCTIONS.pptxSOLVING RATIONAL RATIONAL FUNCTIONS.pptx
SOLVING RATIONAL RATIONAL FUNCTIONS.pptx
SinamarLaroyaRefuerz
Ìý
Bisection method
Bisection methodBisection method
Bisection method
Tirth Parmar
Ìý
Project PPT slides_student_id#104519347
Project PPT slides_student_id#104519347Project PPT slides_student_id#104519347
Project PPT slides_student_id#104519347
savan Darji
Ìý
Formal methods 5 - Pi calculus
Formal methods   5 - Pi calculusFormal methods   5 - Pi calculus
Formal methods 5 - Pi calculus
Vlad Patryshev
Ìý
14th Athens Colloquium on Algorithms and Complexity (ACAC19)
14th Athens Colloquium on Algorithms and Complexity (ACAC19)14th Athens Colloquium on Algorithms and Complexity (ACAC19)
14th Athens Colloquium on Algorithms and Complexity (ACAC19)
Apostolos Chalkis
Ìý
Vectors of Bachelors of computer science
Vectors of Bachelors of computer scienceVectors of Bachelors of computer science
Vectors of Bachelors of computer science
legendgamingnp
Ìý
Chapter 5 Polynomials
Chapter 5 PolynomialsChapter 5 Polynomials
Chapter 5 Polynomials
Reema
Ìý
Linear Size Meshes
Linear Size MeshesLinear Size Meshes
Linear Size Meshes
Don Sheehy
Ìý
Mathematics power point presenttation on the topic
Mathematics power point presenttation on the topicMathematics power point presenttation on the topic
Mathematics power point presenttation on the topic
Meghansh Gautam
Ìý
Polynomial Functions.pdf
Polynomial Functions.pdfPolynomial Functions.pdf
Polynomial Functions.pdf
MarkReyLlabres1
Ìý

More from SungaleliYuen (18)

9_Symbolic Math in MATLAB for Engineers.pptx
9_Symbolic Math in MATLAB for Engineers.pptx9_Symbolic Math in MATLAB for Engineers.pptx
9_Symbolic Math in MATLAB for Engineers.pptx
SungaleliYuen
Ìý
7_Programming in MATLAB For Enginee.pptx
7_Programming in MATLAB For Enginee.pptx7_Programming in MATLAB For Enginee.pptx
7_Programming in MATLAB For Enginee.pptx
SungaleliYuen
Ìý
5_Vectors & Matrices for Engineers .pptx
5_Vectors & Matrices for Engineers .pptx5_Vectors & Matrices for Engineers .pptx
5_Vectors & Matrices for Engineers .pptx
SungaleliYuen
Ìý
3_MATLAB Basics Introduction for Engineers .pptx
3_MATLAB Basics Introduction for Engineers .pptx3_MATLAB Basics Introduction for Engineers .pptx
3_MATLAB Basics Introduction for Engineers .pptx
SungaleliYuen
Ìý
Lecture_3.pptx
Lecture_3.pptxLecture_3.pptx
Lecture_3.pptx
SungaleliYuen
Ìý
5_Basics of Electrical Machines.pptx
5_Basics of Electrical Machines.pptx5_Basics of Electrical Machines.pptx
5_Basics of Electrical Machines.pptx
SungaleliYuen
Ìý
4_Inductance, Energy.pptx
4_Inductance, Energy.pptx4_Inductance, Energy.pptx
4_Inductance, Energy.pptx
SungaleliYuen
Ìý
2_Electric Current.pptx
2_Electric Current.pptx2_Electric Current.pptx
2_Electric Current.pptx
SungaleliYuen
Ìý
VENANCE AND MPYA.pptx
VENANCE AND MPYA.pptxVENANCE AND MPYA.pptx
VENANCE AND MPYA.pptx
SungaleliYuen
Ìý
Angela and claudius.pptx
Angela and claudius.pptxAngela and claudius.pptx
Angela and claudius.pptx
SungaleliYuen
Ìý
MARIA NDAGO PROJECT.pptx
MARIA NDAGO  PROJECT.pptxMARIA NDAGO  PROJECT.pptx
MARIA NDAGO PROJECT.pptx
SungaleliYuen
Ìý
emmanuel and catherine project.pptx
emmanuel and catherine project.pptxemmanuel and catherine project.pptx
emmanuel and catherine project.pptx
SungaleliYuen
Ìý
Lecture 3.pptx
Lecture 3.pptxLecture 3.pptx
Lecture 3.pptx
SungaleliYuen
Ìý
1. Introduction.pptx
1. Introduction.pptx1. Introduction.pptx
1. Introduction.pptx
SungaleliYuen
Ìý
3_Magnetic Circuits.pptx
3_Magnetic Circuits.pptx3_Magnetic Circuits.pptx
3_Magnetic Circuits.pptx
SungaleliYuen
Ìý
4_Inductance, Energy.pptx
4_Inductance, Energy.pptx4_Inductance, Energy.pptx
4_Inductance, Energy.pptx
SungaleliYuen
Ìý
3_Types of DC GEN.pptx
3_Types of DC GEN.pptx3_Types of DC GEN.pptx
3_Types of DC GEN.pptx
SungaleliYuen
Ìý
4_Generator Characteristics.pptx
4_Generator Characteristics.pptx4_Generator Characteristics.pptx
4_Generator Characteristics.pptx
SungaleliYuen
Ìý
9_Symbolic Math in MATLAB for Engineers.pptx
9_Symbolic Math in MATLAB for Engineers.pptx9_Symbolic Math in MATLAB for Engineers.pptx
9_Symbolic Math in MATLAB for Engineers.pptx
SungaleliYuen
Ìý
7_Programming in MATLAB For Enginee.pptx
7_Programming in MATLAB For Enginee.pptx7_Programming in MATLAB For Enginee.pptx
7_Programming in MATLAB For Enginee.pptx
SungaleliYuen
Ìý
5_Vectors & Matrices for Engineers .pptx
5_Vectors & Matrices for Engineers .pptx5_Vectors & Matrices for Engineers .pptx
5_Vectors & Matrices for Engineers .pptx
SungaleliYuen
Ìý
3_MATLAB Basics Introduction for Engineers .pptx
3_MATLAB Basics Introduction for Engineers .pptx3_MATLAB Basics Introduction for Engineers .pptx
3_MATLAB Basics Introduction for Engineers .pptx
SungaleliYuen
Ìý
Lecture_3.pptx
Lecture_3.pptxLecture_3.pptx
Lecture_3.pptx
SungaleliYuen
Ìý
5_Basics of Electrical Machines.pptx
5_Basics of Electrical Machines.pptx5_Basics of Electrical Machines.pptx
5_Basics of Electrical Machines.pptx
SungaleliYuen
Ìý
4_Inductance, Energy.pptx
4_Inductance, Energy.pptx4_Inductance, Energy.pptx
4_Inductance, Energy.pptx
SungaleliYuen
Ìý
2_Electric Current.pptx
2_Electric Current.pptx2_Electric Current.pptx
2_Electric Current.pptx
SungaleliYuen
Ìý
VENANCE AND MPYA.pptx
VENANCE AND MPYA.pptxVENANCE AND MPYA.pptx
VENANCE AND MPYA.pptx
SungaleliYuen
Ìý
Angela and claudius.pptx
Angela and claudius.pptxAngela and claudius.pptx
Angela and claudius.pptx
SungaleliYuen
Ìý
MARIA NDAGO PROJECT.pptx
MARIA NDAGO  PROJECT.pptxMARIA NDAGO  PROJECT.pptx
MARIA NDAGO PROJECT.pptx
SungaleliYuen
Ìý
emmanuel and catherine project.pptx
emmanuel and catherine project.pptxemmanuel and catherine project.pptx
emmanuel and catherine project.pptx
SungaleliYuen
Ìý
Lecture 3.pptx
Lecture 3.pptxLecture 3.pptx
Lecture 3.pptx
SungaleliYuen
Ìý
1. Introduction.pptx
1. Introduction.pptx1. Introduction.pptx
1. Introduction.pptx
SungaleliYuen
Ìý
3_Magnetic Circuits.pptx
3_Magnetic Circuits.pptx3_Magnetic Circuits.pptx
3_Magnetic Circuits.pptx
SungaleliYuen
Ìý
4_Inductance, Energy.pptx
4_Inductance, Energy.pptx4_Inductance, Energy.pptx
4_Inductance, Energy.pptx
SungaleliYuen
Ìý
3_Types of DC GEN.pptx
3_Types of DC GEN.pptx3_Types of DC GEN.pptx
3_Types of DC GEN.pptx
SungaleliYuen
Ìý
4_Generator Characteristics.pptx
4_Generator Characteristics.pptx4_Generator Characteristics.pptx
4_Generator Characteristics.pptx
SungaleliYuen
Ìý

Recently uploaded (20)

Equipment for Gas Metal Arc Welding Process
Equipment for Gas Metal Arc Welding ProcessEquipment for Gas Metal Arc Welding Process
Equipment for Gas Metal Arc Welding Process
AhmadKamil87
Ìý
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptxGROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
meneememoo
Ìý
Env and Water Supply Engg._Dr. Hasan.pdf
Env and Water Supply Engg._Dr. Hasan.pdfEnv and Water Supply Engg._Dr. Hasan.pdf
Env and Water Supply Engg._Dr. Hasan.pdf
MahmudHasan747870
Ìý
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
slayshadow705
Ìý
Soil Properties and Methods of Determination
Soil Properties and  Methods of DeterminationSoil Properties and  Methods of Determination
Soil Properties and Methods of Determination
Rajani Vyawahare
Ìý
eng funda notes.pdfddddddddddddddddddddddd
eng funda notes.pdfdddddddddddddddddddddddeng funda notes.pdfddddddddddddddddddddddd
eng funda notes.pdfddddddddddddddddddddddd
aayushkumarsinghec22
Ìý
Taykon-Kalite belgeleri
Taykon-Kalite belgeleriTaykon-Kalite belgeleri
Taykon-Kalite belgeleri
TAYKON
Ìý
How to Build a Maze Solving Robot Using Arduino
How to Build a Maze Solving Robot Using ArduinoHow to Build a Maze Solving Robot Using Arduino
How to Build a Maze Solving Robot Using Arduino
CircuitDigest
Ìý
Mathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptxMathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptx
ppkmurthy2006
Ìý
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptxRAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
JenTeruel1
Ìý
GREEN BULIDING PPT FOR THE REFRENACE.PPT
GREEN BULIDING PPT FOR THE REFRENACE.PPTGREEN BULIDING PPT FOR THE REFRENACE.PPT
GREEN BULIDING PPT FOR THE REFRENACE.PPT
kamalkeerthan61
Ìý
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptxUNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
KesavanT10
Ìý
Turbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdfTurbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdf
Totok Sulistiyanto
Ìý
Piping-and-pipeline-calculations-manual.pdf
Piping-and-pipeline-calculations-manual.pdfPiping-and-pipeline-calculations-manual.pdf
Piping-and-pipeline-calculations-manual.pdf
OMI0721
Ìý
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
sreenath seenu
Ìý
IPC-9716_2024 Requirements for Automated Optical Inspection (AOI) Process Con...
IPC-9716_2024 Requirements for Automated Optical Inspection (AOI) Process Con...IPC-9716_2024 Requirements for Automated Optical Inspection (AOI) Process Con...
IPC-9716_2024 Requirements for Automated Optical Inspection (AOI) Process Con...
ssuserd9338b
Ìý
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
Ìý
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
J. Agricultural Machinery
Ìý
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Daniel Donatelli
Ìý
Engineering at Lovely Professional University (LPU).pdf
Engineering at Lovely Professional University (LPU).pdfEngineering at Lovely Professional University (LPU).pdf
Engineering at Lovely Professional University (LPU).pdf
Sona
Ìý
Equipment for Gas Metal Arc Welding Process
Equipment for Gas Metal Arc Welding ProcessEquipment for Gas Metal Arc Welding Process
Equipment for Gas Metal Arc Welding Process
AhmadKamil87
Ìý
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptxGROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
GROUP-3-GRID-CODE-AND-DISTRIBUTION-CODE.pptx
meneememoo
Ìý
Env and Water Supply Engg._Dr. Hasan.pdf
Env and Water Supply Engg._Dr. Hasan.pdfEnv and Water Supply Engg._Dr. Hasan.pdf
Env and Water Supply Engg._Dr. Hasan.pdf
MahmudHasan747870
Ìý
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
Structural QA/QC Inspection in KRP 401600 | Copper Processing Plant-3 (MOF-3)...
slayshadow705
Ìý
Soil Properties and Methods of Determination
Soil Properties and  Methods of DeterminationSoil Properties and  Methods of Determination
Soil Properties and Methods of Determination
Rajani Vyawahare
Ìý
eng funda notes.pdfddddddddddddddddddddddd
eng funda notes.pdfdddddddddddddddddddddddeng funda notes.pdfddddddddddddddddddddddd
eng funda notes.pdfddddddddddddddddddddddd
aayushkumarsinghec22
Ìý
Taykon-Kalite belgeleri
Taykon-Kalite belgeleriTaykon-Kalite belgeleri
Taykon-Kalite belgeleri
TAYKON
Ìý
How to Build a Maze Solving Robot Using Arduino
How to Build a Maze Solving Robot Using ArduinoHow to Build a Maze Solving Robot Using Arduino
How to Build a Maze Solving Robot Using Arduino
CircuitDigest
Ìý
Mathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptxMathematics_behind_machine_learning_INT255.pptx
Mathematics_behind_machine_learning_INT255.pptx
ppkmurthy2006
Ìý
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptxRAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
RAMSES- EDITORIAL SAMPLE FOR DSSPC C.pptx
JenTeruel1
Ìý
GREEN BULIDING PPT FOR THE REFRENACE.PPT
GREEN BULIDING PPT FOR THE REFRENACE.PPTGREEN BULIDING PPT FOR THE REFRENACE.PPT
GREEN BULIDING PPT FOR THE REFRENACE.PPT
kamalkeerthan61
Ìý
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptxUNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
UNIT 1FUNDAMENTALS OF OPERATING SYSTEMS.pptx
KesavanT10
Ìý
Turbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdfTurbocor Product and Technology Review.pdf
Turbocor Product and Technology Review.pdf
Totok Sulistiyanto
Ìý
Piping-and-pipeline-calculations-manual.pdf
Piping-and-pipeline-calculations-manual.pdfPiping-and-pipeline-calculations-manual.pdf
Piping-and-pipeline-calculations-manual.pdf
OMI0721
Ìý
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt04  MAINTENANCE OF CONCRETE PAVEMENTS.ppt
04 MAINTENANCE OF CONCRETE PAVEMENTS.ppt
sreenath seenu
Ìý
IPC-9716_2024 Requirements for Automated Optical Inspection (AOI) Process Con...
IPC-9716_2024 Requirements for Automated Optical Inspection (AOI) Process Con...IPC-9716_2024 Requirements for Automated Optical Inspection (AOI) Process Con...
IPC-9716_2024 Requirements for Automated Optical Inspection (AOI) Process Con...
ssuserd9338b
Ìý
decarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptxdecarbonization steel industry rev1.pptx
decarbonization steel industry rev1.pptx
gonzalezolabarriaped
Ìý
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
Optimization of Cumulative Energy, Exergy Consumption and Environmental Life ...
J. Agricultural Machinery
Ìý
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2Best KNow  Hydrogen Fuel Production in the World The cost in USD kwh for H2
Best KNow Hydrogen Fuel Production in the World The cost in USD kwh for H2
Daniel Donatelli
Ìý
Engineering at Lovely Professional University (LPU).pdf
Engineering at Lovely Professional University (LPU).pdfEngineering at Lovely Professional University (LPU).pdf
Engineering at Lovely Professional University (LPU).pdf
Sona
Ìý

8_Polynomials, Curve Fitting & Interpolation.pptx

  • 1. POLYNOMIALS, CURVE FITTING, AND INTERPOLATION
  • 2. POLYNOMIALS o Polynomials are mathematical expressions that are frequently used for problem solving and modeling in science and engineering o In many cases an equation that is written in the process of solving a problem is a polynomial, and the solution of the problem is the zero of the polynomial o MATLAB has a wide selection of functions that are specifically designed for handling polynomials
  • 3. Cont.. . o Polynomials are functions that have the form: o The coefficients and are real numbers, and n which is a non- negative integer, is the degree, or order, of the polynomial o In MATLAB, polynomials are represented by a row vector in which the elements are the coefficients and +
  • 4. Cont.. . o The first element is the coefficient of the x with the highest power o The vector has to include all the coefficients, including the ones that are equal to 0 Example: Equation MATLAB Form MATLAB Representation [ 5,0,0,6,7,0]
  • 5. Value of Polynomials o The value of a polynomial at a point x can be calculated with the function polyval • p - is a vector with the coefficients of the polynomial • x - is a number, or a variable that has an assigned value, or a computable expression • x - can also be a vector or a matrix polyval(p,x)
  • 6. Example For the polynomial + a. Calculate f(9) b. Plot the polynomial for
  • 7. Roots of a Polynomial o The roots of a polynomial are the values of the argument for which the value of the polynomial is equal to zero o MATLAB has a function, called roots, that determines the root, or roots, of a polynomial • r - is a column vector with the roots of the polynomial • p - is a row vector with the coefficients of the polynomial r = roots(p)
  • 8. Cont.. . o When the roots of a polynomial are known, the poly command can be used for determining the coefficients of the polynomial • p - is a row vector with the coefficients of the polynomial • r - is a vector (row or column) with the roots of the polynomial p = poly(r)
  • 9. Example For the polynomial + a. Find the roots b. From ‘a’ above find the coefficients
  • 10. Addition, Multiplication, and Division Addition » Two polynomials can be added (or subtracted) by adding (subtracting) the vectors of the coefficients » If the polynomials are not of the same order (which means that the vectors of the coefficients are not of the same length), the shorter vector has to be modified to be of the same length as the longer vector by adding zeros (called padding) in front
  • 11. Multiplication » Two polynomials can be multiplied using the MATLAB built-in function conv • c - is a vector of the coefficients of the polynomial that is the product of the multiplication • a and b - are the vectors of the coefficients of the polynomials that are being multiplied » The two polynomials do not have to be of the same order c = conv(a,b)
  • 12. Division » A polynomial can be divided by another polynomial with the MATLAB built-in function deconv • q - vector with the coefficients of the quotient polynomial. • r - vector with the coefficients of the remainder polynomial • u - vector with the coefficients of the numerator polynomial • v - vector with the coefficients of the denominator polynomial [q,r] = deconv(a,b)
  • 13. Example For the polynomial and a. Add b. Subtract c. Multiply d. Divide
  • 14. Derivatives of Polynomials o The built-in function polyder can be used to calculate the derivative of a single polynomial, a product of two polynomials, or a quotient of two polynomials 1. k = polyder(p) Derivative of a single polynomial. p is a vector with the coefficients of the polynomial k - is a vector with the coefficients of the polynomial that is the derivative
  • 15. Cont.. . 2. k = polyder(a,b) Derivative of a product of two polynomials a and b - vectors with the coefficients of the polynomials that are multiplied k - is a vector with the coefficients of the polynomial that is the derivative of the product
  • 16. Cont.. . 3. [n d]= polyder(u,v) Derivative of a quotient of two polynomials u and v - vectors with the coefficients of the numerator and denominator polynomials n and d - vectors with the coefficients of the numerator and denominator polynomials in the quotient that is the derivative
  • 17. Cont.. . o The only difference between the last two commands is the number of output argument o With two output arguments MATLAB calculates the derivative of the quotient of two polynomials o With one output argument, the derivative is of the product.
  • 18. Example For the polynomial and find the derivative of a.