-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Piotr Majdak wrote:
Federico wrote:
don't know if derivative is the right term.. i mean: f(x)=x => f'(x)=1 f(x)=ln(x) => f'(x)=1/x f(x)=sin(x) => f'(x)=cos(x)
I don't know such as object, but maybe this will help you a little bit: Because you're dealing with finite discrete signals, the derivative of a signal becomes a difference between two consecutive samples. You can easily implement it using [z~] (from zexy, I think) and then subtract the delayed and original sequence:
y[n]= x[n]-x[n-1]
hmm... I tried this with [z~] and [fexpr~], achieving the same result....
I wonder if there are errors in this way of computing derivative...
I am looking at my math notebook, where I read that derivatives are the "limit for the incremental ratio of a function", where h is the increment, and f(x) is the function, and I have this formula:
y' = lim {h >> 0} ( f(x+h) - f(x) ) / h
translating this into a fexpr~ I do:
[osc~] [float (h)] | | [fexpr~ ($x1-$x1[-$f2])/$f2]
recalling the rules above, for f(x)=sin(x), I should have f'(x)=cos(x), however its amplitude lower as frequency lowers... and phase offset of [osc~]' is 180° not 90°.... what's the problem? h isn't enough close to zero?
is there an "ideal" derivator? or I am say something totally wrong?
Federico