MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
6th Edition
ISBN: 9781119256830
Author: Amos Gilat
Publisher: John Wiley & Sons Inc
bartleby

Videos

Textbook Question
Book Icon
Chapter 8, Problem 15P

Write a user-defined function that adds or subtracts two polynomials of any order. Name the function p=po1yadd(p1, p2, operation). The first two input arguments pi and p2 are the vectors of the coefficients of the two polynomials. (If the two polynomials are not of the same order, the function adds the necessary zero elements to the shorter vector.) The third input argument operation is a string that can be either ‘add’ or ‘sub’, for adding or subtracting the polynomials, respectively, and the output argument is the resulting polynomial.

Use the function to add and subtract the following polynomials:

f 1 ( x ) = 8 x 6 + 10 x 5 5 x 3 + 13 x 2 4 x 2 and f 2 ( x ) = 4 x 4 + 7 x 2 + 6

Blurred answer

Chapter 8 Solutions

MATLAB: An Introduction with Applications

Knowledge Booster
Background pattern image
Statistics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, statistics and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Text book image
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:9781133382119
Author:Swokowski
Publisher:Cengage
Text book image
Linear Algebra: A Modern Introduction
Algebra
ISBN:9781285463247
Author:David Poole
Publisher:Cengage Learning
Text book image
Trigonometry (MindTap Course List)
Trigonometry
ISBN:9781337278461
Author:Ron Larson
Publisher:Cengage Learning
Vector Components and Projections in 3-Dimensions; Author: turksvids;https://www.youtube.com/watch?v=DfIsa7ArxSo;License: Standard YouTube License, CC-BY
Linear Algebra 6.2.2 Orthogonal Projections; Author: Kimberly Brehm;https://www.youtube.com/watch?v=fqbwErsP8Xw;License: Standard YouTube License, CC-BY