Lecture10

# Lecture10 - EGR 106 Lecture 10 Polynomial Applications...

This preview shows pages 1–11. Sign up to view the full content.

EGR 106 – Lecture 10 Polynomial Applications Polynomials Representation and Evaluation Finding Roots Addition, Multiplication and Division Taking Derivatives Curve Fitting – Regression Interpolation Textbook: 8.1 – 8.4

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Polynomials Polynomials are functions of the general form:
clc;clf x=[0:0.1:5]; yq=x.^2-6*x+5; plot(x,yq,'linewidth',2) xlabel('x');ylabel('yq , yc'); hold on;grid on %cubic polynomial yc yc=-0.15*x.^3+x.^2-2*x+5; plot(x,yc,'linewidth',2) 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 -4 -3 4 5 x Quadratic & Cubic Polynomial Example Plots

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Polynomials in M ATLAB 9 x 4 – 5 x 3 + 7 x 2 + 6 Represented in M ATLAB by its coefficients in array format (note the order): p = [ 9 –5 7 0 6 ] note the zero!
Polynomial Evaluation – polyval

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Polynomial Evaluation – polyval F ( x ) = x 3 + 6 x 2 + 11 x + 6 F ( 2 ) = 60 >> polyval( [ 1 6 11 6 ], 2 ) ans = 60 can be an array
Polynomial Roots

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
-3.5 -3 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 Polynomial Roots x 3 + 6 x 2 + 11 x + 6 ( x + 1 ) ( x + 2 ) ( x + 3 ) >> roots( [ 1 6 11 6 ] ) ans = -3.0000 -2.0000 -1.0000 x
Polynomial Multiplication – conv

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Polynomial Multiplication – conv ( 2 x 2
This is the end of the preview. Sign up to access the rest of the document.

## Lecture10 - EGR 106 Lecture 10 Polynomial Applications...

This preview shows document pages 1 - 11. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online