excelfrequencywaveamplitudedividebyzeroexception

Divide by zero error when calculating frequency?


I have a file containing 2 columns: time & volts. I'm trying to calculate the frequency of the highest amplitude wave.
(Bear in mind that Each wave is of fixed frequency)

I'm ordering the file in Excel using the volts column in descending order, selecting the top row, then doing the following: 1/time but I get an error as the top row has 0 secs. A divide by zero error!

Where am I going wrong ? Thanks

Time, Volt

0, 0.1842751

1.183778E-08, 0.1842751

2.367556E-08, 0.1842751

3.551333E-08, 0.1842751

.........

1.029887E-06, -0.1842751

1.041724E-06, -0.1842751

1.053562E-06, -0.1842751

1.0654E-06, -0.1842751

1.077238E-06, -0.1842751

1.586262E-06, -0.1842751


Solution

  • You should never divide by zero.

    1. locate two consecutive peaks in column B
    2. calculate the time difference between the corresponding times in column A
    3. divide 1 by this time difference

    By the way this is not an Excel issue:

    enter image description here