Derivatives of polynomials is very important stuff in engineering and science. You can obtain various kinds of datas from given equation as polynomial that has one variable, with derivative calculations. Sometimes, derivative calculation of long-tail polynomials can be tough by hand. But it is very easy in Matlab with ‘polyder()’ command. In this article, we will show you how to calculate derivatives of polynomials with ‘polyder()’ command in Matlab, with a very basic example below.
To calculate derivatives of polynomials in Matlab, you need to understand the logic of definition of polynomials with vectors. For example we defined two of vectors as shown in green box above called as ‘a’ and ‘b’. For instance the vector ‘a’ stands for the polynomial of 4x^5+6x^4+5x^3+8x^2+9x+3. So, each of element of a vector stands for coefficients respectively starting from left in Matlab.
We directly calculated the derivative of polynomial ‘a’ with polyder() command as shown by green arrow above. We assigned a variable called ‘c’ to polyder() command, then we typed the polynomial ‘a’ in pharanthesis of polyder(). Result is given as same logic with polynomials as shown by green arrow.
So you can calculate the derivative of the multiplication of vectors with polyder() command as shown by red arrow above in Matlab. What we did is just typing of polynomials that is multiplied.
Also you can calculate the second, third… derivatives of polynomials as shown by blue arrows above. Just type the first derivative variable inside new polyder() command to calculate the second derivative. You can do this for third and others in Matlab.
The use of ‘polyder()’ command to calculate derivatives of polynomials in Matlab is very easy like above. Do not forget to leave your comments and questions below about ‘polyder()’ command in Matlab!