[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sine wave equations

From: Paul Roberts
Subject: Re: sine wave equations
Date: Sat, 2 Dec 2006 12:45:02 -0800

Most likely just an aliasing problem. Make sure that you have a high
enough sampling frequency in x. For example, lets say that x
represents space. The spatial frequency of your sine wave seems to be
1/lambda. To sample the function properly, your delta_x should be at
least as small as lambda/2. So you would use:

delta_x = lambda/2;
x = x_min:delta_x:x_max;

If you wanted to oversample, you could use a smaller delta_x


On 12/2/06, Doug Stewart <address@hidden> wrote:
What do you mean when you say corrupted sin waves?   Do you want more
samples per sin wave?

What values are you using for
lambda =?

Doug Stewart

> Dear all,
> I am using NEURON simulation package, a tool for simulating Neurons. In the
> simulation I am currently building I am using sine wave equations. And the
> sine wave plots look somewhat corrupted. Not all the waves are of the same
> shape etc. Now, there must be loads of people on this list that know these
> sine equations backwards. So, I write to kindly ask if my equations are OK.
> I write because my NEURON simulation is not working as desired - and a fault
> in the sine wave equations is one candidate. I have already done a little
> check myself by using an online plotting applet to see what their plot looks
> like. ANd it looks fine! So I write to this list as an extra check.
> 2 one dimensional sine wave equations 180 degrees out of phase (with an
> offset, D, for each, that ensures the centre is non-zero. So that we dont
> ever have negative values).
> y(x) = A*sin(((2*PI*x)/lambda)-0) + D
> where A = D
> y(x) = A*sin(((2*PI*x)/lambda)-PI) + D
> where A = D
> Now, I have tried these alternative equations as well. These form corrupted
> sine waves as well:
> y(x) = A*sin(((360*x)/lambda)-0) + D
> where A = D
> y(x) = A*sin(((360*x)/lambda)-180) + D
> where A = D
> For anyone that wants to go deeper into my problem (though this would
> require some neuroscience knowledge) there is a running thread on it at this
> forum (NEURON forum hosted at Yale):
> _________________________________________________________________
> It's Hotmail's 10th Birthday! Come and play Pass the Parcel
> _______________________________________________
> Help-octave mailing list
> address@hidden

Help-octave mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]