My code so far (doesnt work):
function derivativecoefficient = derivpolycalc()a = input('Enter the coefficent of the polynomial')x == xn = input('Enter the power of each x')derivativecoefficient = polyder(a)derivative = derivativecoefficient*x^(n - 1)end
If i just do it where it shows the coeeficents, I could simply do:
function derivativecoefficient = derivpolycalc()a = input('Enter the coefficent of the polynomial')derivativecoefficient = polyder(a)>> derivpolycalcEnter the coefficent of the polynomial[3,2,5]a = 3 2 5derivativecoefficient = 6 2ans = 6 2
BUT I want a code that will display
6x^2+2x+0..
or maybe it could display
6x^5+2x^3+0
depending on what the original function was.
Best Answer