Default sample rate and aliasing

[email protected] (Maximilian Matthé) Tue, 14 Dec 2010 21:58:09 +0100
Newsgroups gmane.comp.graphics.gnuplot.bugs
Message-ID <[email protected]>
Hi!

Today I was quite confused with with

,----
| gnuplot -e "plot sin(2*pi*10*x); pause -1"
`----

since it displays a sine with frequency of 1/10 and not 10. This is
caused by aliasing (the sample rate is too low). That behaviour is very
confusing to new users. Maybe it would be good to set the default
sample-rate higher, e.g. 500 or sth?

There's another thing I found out while examining the problem: With a
sample count of 100 the plotted sine should actually have the frequency
0, which is a constant (follows from frequency domain
considerations). Setting the samples to 

,----
| set samples 101;
| plot sin(2*pi*10*x);
`----

gives a constant at 0, so I would think that the actual sample rate is
one less than the set one. (I did not see throug the source).

Thanks for your considerations,
Max


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
gnuplot-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnuplot-bugs