[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Numerical Differentiation and Integration of Array Data
From: |
syberraith |
Subject: |
Re: Numerical Differentiation and Integration of Array Data |
Date: |
Sun, 4 Dec 2011 14:20:46 -0800 (PST) |
Although this seems to be wrong too.
Am I to take it that with only 3 samples the accuracy of the diff function
is already at a maximum?
n = 3
p = 2 * pi;
h = p / (n-1);
g = h / 2;
function y = f ( x )
y = sin( x );
endfunction
t = linspace(0, p, n);
a = diff ( f(t) ) / h;
s1 = sum(a.*h)
s2 = f(p) - f(0)
ds = s1 - s2
n = 3
s1 = -2.4492e-16
s2 = -2.4492e-16
ds = -4.9304e-32
Does the sampling rate here have anything to do with the Nyquist frequency,
which in this case would be 2Hz?
And a sampling rate of 2hz would only detect variations in the signal that
were below 1hz. So if the signal, the velocity of my particle here,
contained any information higher then 1hz, which the sin function lacks, it
should be undetectable in the result, aye?
I actually doubt there would be any major components in the result higher
than the second harmonic of the period frequency, although the delta-theta
correction might introduce some. So would a sampling rate of 4/p be
sufficient according to Nyquist?
Maybe I should analyze the output of the functions in the frequency domain
just to see what's going on there...
--
View this message in context:
http://octave.1599824.n4.nabble.com/Numerical-Differentiation-and-Integration-of-Array-Data-tp4145498p4158382.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Re: Numerical Differentiation and Integration of Array Data, (continued)
- Re: Numerical Differentiation and Integration of Array Data, c., 2011/12/03
- Message not available
- Re: Numerical Differentiation and Integration of Array Data, Carlo de Falco, 2011/12/03
- Re: Numerical Differentiation and Integration of Array Data, syberraith, 2011/12/03
- Re: Numerical Differentiation and Integration of Array Data, c., 2011/12/04
- Re: Numerical Differentiation and Integration of Array Data, Carlo de Falco, 2011/12/04
- Re: Numerical Differentiation and Integration of Array Data, syberraith, 2011/12/04
- Re: Numerical Differentiation and Integration of Array Data, c., 2011/12/04
- Re: Numerical Differentiation and Integration of Array Data, syberraith, 2011/12/04
- Re: Numerical Differentiation and Integration of Array Data,
syberraith <=
- Re: Numerical Differentiation and Integration of Array Data, syberraith, 2011/12/04
- Re: Numerical Differentiation and Integration of Array Data, Francesco Potortì, 2011/12/05
- Re: Numerical Differentiation and Integration of Array Data, syberraith, 2011/12/05
- Re: Numerical Differentiation and Integration of Array Data, syberraith, 2011/12/04
- Re: Numerical Differentiation and Integration of Array Data, c., 2011/12/04
- Re: Numerical Differentiation and Integration of Array Data, syberraith, 2011/12/05
- Re: Numerical Differentiation and Integration of Array Data, syberraith, 2011/12/05
- Re: Numerical Differentiation and Integration of Array Data, Francesco Potortì, 2011/12/05
- Re: Numerical Differentiation and Integration of Array Data, Francesco Potortì, 2011/12/05
- Re: Numerical Differentiation and Integration of Array Data, c., 2011/12/05