discrete derivative matlab
Hello, brmadhukar:
Thank you for your reply.
The function diff() in matlab can only operate on real number arrary. Initially I had thought that the we cannot deal with complex number the same way we with the real number, thus posted the help here.
Later, I searched some materials on this topic and found that as long as one of the variable is real(here in my case is frequency:f), the finite difference that apply to real numbers still can apply to complex number(effectively treat real part and imaginary part of the complex number separately).
Thus, I can approximate dX/df=diff(X)./diff(f) assuming X is complex discrete data and the result will have a array length of (n-1), assuming the original array X has a length of n.
Regards,