Question: Problem Six: Given two polynomials: g(x) = anx + an-111 + + aix + ao Write a MATLAB function (name it polyadd) to add the
Problem Six: Given two polynomials: g(x) = anx" + an-11"1 + + aix + ao Write a MATLAB function (name it polyadd) to add the two polynomials and returns a polynomial t(x) = g(x) + h (x), whether m = n, m n. Polynomials are added by adding the coefficients of the terms with same power. Represent the polynomials as vectors of coefficients. Hence, the input to the function are the vectors: ao] and h=[am Test the function using the following polynomials: g= [an an- al am-1 ai ao] a) g-[1234] and h = [10203041]. b) g [ 2 13 14] and h [10 102). c) g-43 54 55] and h 77 66 88 44 331
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
