Finding frequencies given AC voltage samples

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
sekhar4
Messages
1
Reaction score
0

Homework Statement


Hey. I am new here.
Recently i got a C assignment (computing) in which i was given around 20 files..each with thousands of AC voltage test samples sampled at 1 ms..so technically 100 samples= 1 second.
I was told that there 3 different kinds of frequencies in the files and that i have to find them.


Homework Equations



freq=1/timeperiod

The Attempt at a Solution


I went through the samples and realized that if I count the no: of 0's ( 0.00045 or 0.0002) etc and divide the total no: by three, I should be getting the no: waves ..
now freq=(total no:of waves x 100 ) / total no: of samples .

i just want to know if I am doing it right ..please tell me..
I can write codes no problem ..but I want to know if I am heading in the right direction.
PS- can't upload even one of the .txt files as they are around 127 kb each and the forum only allows 100 kb ... sad
 
Physics news on Phys.org
If you have test samples sampled every 1ms (1x10^-3s) then you have 1000 samples per second.

Can you post an example of the numbers which represent one sample?