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, 22.06.2019 11:00
You receive an email from an impressive-sounding stranger, professor alexander rothschild renard iii, president of the american institute for scientific political statesmen. he urges you to vote for his presidential candidate choice. this social media red flag is known as
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 23.06.2019 20:00
What software programs are used to to create professional publication? a.) graphics programs b.) word processors c.) page layout programs d.) spreadsheet programs
Answers: 2
question
Computers and Technology, 23.06.2019 22:30
What would be the address of the cell, which is at the intersection of the second row and the third column in a worksheet?
Answers: 1
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, 13.10.2020 14:01
question
Mathematics, 13.10.2020 14:01
question
Social Studies, 13.10.2020 14:01
question
History, 13.10.2020 14:01
Questions on the website: 13722360