matlab中用函数diff做求导

函数描述:DIFF Difference and approximate derivative.

语法格式:

Y = diff(X)Y = diff(X,n)Y = diff(X,n,dim)