+ Post New Thread
Results 1 to 3 of 3

25th April 2005, 12:50 #1
 Join Date
 Aug 2004
 Posts
 91
 Helped
 24 / 24
 Points
 3,620
 Level
 14
matlab derivative of data
Hello:
I need to compute derivatives of complex discrete data in Matlab, anyone here can tell me how to perform it? (Buildin functions?)
For example, I have the following frequency dependent data:
f X
f1 x1jy1
f2 x2+jy2
f3 x3jy3
...
....
Where fi,xi and yi are real numbers with particular value. How should I compute
f*dx/df in matlab?
Thanks in advance.

Advertisement

28th April 2005, 04:59 #2
 Join Date
 Jun 2002
 Location
 India
 Posts
 840
 Helped
 43 / 43
 Points
 5,272
 Level
 17
matlab discrete derivative
Hi,
cant you use diff instruction and then use array multiplication?
brmadhukar

Advertisement

29th April 2005, 07:28 #3
 Join Date
 Aug 2004
 Posts
 91
 Helped
 24 / 24
 Points
 3,620
 Level
 14
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 (n1), assuming the original array X has a length of n.
Regards,
+ Post New Thread
Please login