the original didnt say the sampling frequency was 1/8000 sec.

note:
NB.  We'll sample a sine wave at 194.18 Hz over 1 second.
NB.  Or in other words: our x axis covers 194.18 radians,
NB.  and we'll choose our 8000 sample points from that range:

this is a *finite length* sample. This is not a continuous signal. There 
is a *start sample* and an *end sample*.

he said he had 8000 samples which frame 1 second.
ie. the first sample (sample 0) at the start of the period (when no time 
has lapsed) and the final sample (sample 7999) at the end of
the period (when 1 sec has lapsed).
that makes 8000 samples and 7999 sample intervals.

if the sampling had gone on for one more second at the same rate there
would have been
1 + 2 * 7999 samples.

if whoever it was had intened that the sampling frequency to be
8000 samples / second, then for the period of 1 second there would
have been 8001 samples.  Maybe that's what s/he intended. But that's 
not what was stated.

if it was the case that the sampling frequency of 8000 samples per
second was intended there would have been 8001 sample points, therefore ...

SampleValues =. 1 o. (194.18 * 2p1 ) * (i. % <:) 8001

On 2011-07-15 06:25, bill lam wrote:
> That depends on how you want to interpret the problem. From my
> understanding, a sampling frequency of 8khz should correspond to
> sampling at intervals of 1/8000 sec (not 1/7999).
>
> Птн, 15 Июл 2011, mijj писал(а):
>> "0 and 2p1 are the same point on the unit circle."
>>
>> which explains why the signal at those angles have the same value.
>> ie. shows that the value at 2p1 is the same as the value at 0.
>>
>> in this case we're going round the unit cirlce more than once
>> (ie. 194.18Hz signal for 1 second = we've gone round the unit
>> circle 194.18 times for the sampling period)
>> But, just because we've been at particular angles of the signal
>> before, it doesn't mean that there's no sample to be had.
>>
>> ...
>>
>> oh .. sampling frequency comes to mind .. sampling frequency
>> should be greater than 2* the highest frequency in the signal
>> (to avoid aliasing).
>>
>> 8000 sample points over one second =>
>> rate = 7999 [samples / second]>  2 * 194.18 [Hz]
>> .. so that's ok
>> (note: 3 samples taken over one second =>
>> 1 intial sample + rate of 2 sample / second)
>>
>>
>>
>> On 2011-07-15 05:11, bill lam wrote:
>>> 0 and 2p1 are the same point on the unit circle.  This is related to Nyquist
>>> sampling frequency if my memory still serves me.
>>>
>>> Птн, 15 Июл 2011, mijj писал(а):
>>>> in the original:
>>>> NB.  We'll sample a sine wave at 194.18 Hz over 1 second.
>>>> NB.  Or in other words: our x axis covers 194.18 radians,
>>>> NB.  and we'll choose our 8000 sample points from that range:
>>>>
>>>> that's 8000 sample *points*
>>>>
>>>> 8000 sample points means 7999 sample *intervals*
>>>>
>>>> ie. the range of (194.18 * 2p1 ) has
>>>> 7999 sample intervals and 8000 sample points
>>>>
>>>> so, in terms of proportion of a segment:
>>>> 7999 intervals and 8000 points:
>>>> (i. %<:) 8000   NB. ranges from 0 .. 1
>>>>
>>>> so ...
>>>>
>>>> SamplePoints =. 1 o. (194.18 * 2p1 ) * (i. %<:) 8000
>>>>
>>>>
>>>>
>>>> On 2011-07-15 03:09, [email protected] wrote:
>>>>> mijj>     yeh .. i always confuse samples with sample intervals too ..
>>>>> mijj>     should be ...
>>>>> mijj>     x =. 1 o. (194.18 * 2p1 ) * (i. %<:) 8000
>>>>>
>>>>> Should be not.  So, once more:
>>>>>
>>>>> The sample interval here is 1r8000 sec (=8kHz
>>>>> sampling).  For Ian, the one-second signal is "194.14 sine waves",
>>>>> and for direct treatment of "sin(x)" function with 1&o., the "x"
>>>>> values ("points where the samples are taken") for the periods have
>>>>> to be measured in the radians:
>>>>>
>>>>>   x =. (194.18 * 2p1 ) * (i. %<:) 8000
>>>>>
>>>>> At every sample point, the sample value ("sample") will be the
>>>>> sine value or some scaling thereof:
>>>>>
>>>>>   samples =.  ...   1 o. x
>>>>>
>>>>> Less confused now?
>>>>>
>>>>>                                           Martin Neitzel
>>>>>
>>>>> (Before submitting my code last night, I checked a 440 Hz version
>>>>> against my tuning fork.  You might get one before posting, too.)
>>>>> ----------------------------------------------------------------------
>>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>>>
>>>> ----------------------------------------------------------------------
>>>> For information about J forums see http://www.jsoftware.com/forums.htm
>>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to