Question: Matlab code please.. MAE 340 EXERCISE 4 1. Given the two polynomials and write a script to add them - that is, h(x)y(x) + z(x)

Matlab code please..  Matlab code please.. MAE 340 EXERCISE 4 1. Given the two

MAE 340 EXERCISE 4 1. Given the two polynomials and write a script to add them - that is, h(x)y(x) + z(x) when m- n, mn. Polynomials are added by adding the coefficients of the terms with the same exponent. Assume that the input to the script are the vectors p = [P1P2 Pn pn +1] and s = [s1S2 Srns,n+1] Check your script with the following data sets: a, p = [1, 2, 3, 4] and s = [ 10, 20, 30, 40] b. p [11, 12, 13, 14] and s [101, 102] c. p [43, 54, 55] and s [77, 66, 88, 44, 33] [Answers: a. h [11, 22, 33, 44] b. h [11, 12, 114, 116] c. h [77, 66, 131, 98, 88].] In this case, write and save the script first as an M-file. Then display the script in the notebook with the "type" command. Execute the script for the data sets in a., b., c., in the notebook

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!