subject

Write a user-defined function that adds or subtracts two polynomials of any order. name the function p=polyadd(p1,p2,operation). the first two input arguments p1 and p2 are the vectors of the coefficients of the two polynomials. (if the two polynomials are not of the same order, the fuction adds the necessary zero elements to the shorter vector.) the thrid input arguement 'operation' is a string that can be either 'add' or 'sub', for adding or subtracting the polynomials, respectively, and the output arguement is the resulting polynomial. use the function to add and subtract the following polynomials: f1(x)=x^5-7x^4+11x^3-4x^2-5x-2f2(x) =9x^2-10x+6in your comments be sure to include a description of the function, it's inputs, and it's outputs, as well as the results from adding and subtracting the two equations listed. if the user doesn't enter 'add' or 'sub' as an option, you may simply print an error message and exit the function. there is no need to ask them to re-enter any inputs.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
Business professionals of america, and future business leaders of america – phi beta lambda are both open to business students at which levels? check all that apply. elementary school middle school high school college
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
Select the correct answer. a company is currently focusing on creating specific management goals for itself. which level of maturity is the company demonstrating under the sse_ccm framework? a. performed informally b. planned and tracked c. quantitatively controlled d. well-defined e. continuously improving
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
The more powerful, 60 volt cables and the main power shut-off on an hev are both colored orange.
Answers: 1
question
Computers and Technology, 24.06.2019 05:30
If you combine two cells into one, what action are you performing? a.  adding a new row or column      b.  splitting the cells      c.  removing a new row or column      d.  merging the cells
Answers: 2
You know the right answer?
Write a user-defined function that adds or subtracts two polynomials of any order. name the function...
Questions
question
Mathematics, 29.12.2019 09:31
question
History, 29.12.2019 09:31
Questions on the website: 13722362