You can use diff
and polyder
functions in MATLAB to compute the 100th derivative of a given polynomial function. Here is an example code:
main.m218 chars13 lines
This code defines a polynomial function f
, then applies polyder
function in a loop 100 times to find the 100th derivative. Finally, it outputs the result.
Note that the polyder
function works only with polynomial functions, so you need to convert your function to a polynomial form using sym2poly
function. If your function is not a polynomial, you cannot use this method to find its derivative.
gistlibby LogSnag