Question: Write a MATLAB function named diff that accepts the coefficients of a polynomial presented in increasing order and return the corresponding coefficients of the derivative

Write a MATLAB function named diff that accepts the coefficients of a polynomial presented in increasing order and return the corresponding coefficients of the derivative polynomial. y = 3 + 2x + 4x^4 has derivative y' = 2 + 16x^3 so the input would be [3, 2, 0, 0, 4] and the output would be [2, 0, 0, 16]. Z = 3t + 2t^3 - 3t^6 - 3t^6 has derivative y' = 3 + 6t^2 - 18t^5 so the input would be [0, 3, 0, 2, 0, 0, -3] and the output would be [3, 0, 6, 0, 0, -18]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
