Results 1 to 11 of 11

# Thread: Decibel Loudness

- 07-03-2013, 12:31 PM #1Member
- Join Date
- Jun 2013
- Location
- Philippines
- Posts
- 15

- Rep Power
- 0

## Decibel Loudness

The loudness of a sound is measured in units of decibels and is calculated as shown: 10LOG (SL/RL)

SL is the intensity of the sound being measured.

RL is a reference sound intensity level.

Using this formula, calculate and display the decibel loudness of a busy street having a sound intensity of 10,000,000 RL.

- 07-03-2013, 12:41 PM #2
## Re: Decibel Loudness

Would you like fries with that?

Post your code and ask specific questions, nobody will do your homework for you.Math problems? Call 1-800-[(10x)(13i)^2]-[sin(xy)/2.362x]

The Ubiquitous Newbie Tips

- 07-03-2013, 12:46 PM #3Member
- Join Date
- Jun 2013
- Location
- Philippines
- Posts
- 15

- Rep Power
- 0

## Re: Decibel Loudness

Haha. what shall I do? Am I going to enter a value for SL or not?

This is what I already started.

import java.util.*;

import java.math.*;

public class Assignment3 {

public static void main(String[] args){

double decibelLoudness, log=10, sL, rL=10000000;

Scanner input = new Scanner(System.in);

System.out.println("Intensity Sound: ");

sL = input.nextDouble();

decibelLoudness = (Math.log(log) * (sL / rL));

System.out.println("Decibel Loudness " +decibelLoudness);

}

}

I'm not sure about the output eh.

- 07-03-2013, 12:52 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 13,529
- Blog Entries
- 7

- Rep Power
- 20

## Re: Decibel Loudness

Check out the Math class; it has a log10( ... ) method.

kind regards,

Jos**cenosillicaphobia**:*the fear for an empty beer glass*

- 07-03-2013, 12:56 PM #5Member
- Join Date
- Jun 2013
- Location
- Philippines
- Posts
- 15

- Rep Power
- 0

## Re: Decibel Loudness

what do you mean?

- 07-03-2013, 01:14 PM #6Just a guy
- Join Date
- Jun 2013
- Location
- Netherlands
- Posts
- 4,030

- Rep Power
- 6

## Re: Decibel Loudness

What do you mean, "what do you mean"? Check out the log10 method of the Math class.

Math (Java Platform SE 7 )

- 07-03-2013, 01:37 PM #7
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 13,529
- Blog Entries
- 7

- Rep Power
- 20

- 07-03-2013, 01:47 PM #8Member
- Join Date
- Jun 2013
- Location
- Philippines
- Posts
- 15

- Rep Power
- 0

## Re: Decibel Loudness

may I know what will be its formula if RL = 10,000,000?

The decibel sound should be 70 if RL = 10,000,000.

- 07-03-2013, 02:13 PM #9
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 13,529
- Blog Entries
- 7

- Rep Power
- 20

## Re: Decibel Loudness

Your representation of a dB formula is inaccurate; it should be dB= 10*log(sl/rl) where log( ... ) is the base 10 logarithm; if sl == 10000000*rl the outcome of the formula is indeed equal to 70. See this link: https://en.wikipedia.org/wiki/Decibel

kind regards,

JosLast edited by JosAH; 07-03-2013 at 02:15 PM. Reason: forgot to post the link

**cenosillicaphobia**:*the fear for an empty beer glass*

- 07-03-2013, 03:56 PM #10Member
- Join Date
- Jun 2013
- Location
- Philippines
- Posts
- 15

- Rep Power
- 0

## Re: Decibel Loudness

What's wrong with this?

import java.math.*;

public class Assignment3 {

public static void main(String[] args){

double decibelLoudness;

decibelLoudness = (10 * Math.log(10000000));

System.out.println("Decibel Loudness " +decibelLoudness);

}

}

The output should be 70, but why is it 161.18095650.....

Is there something wrong with formula or else something like that?

- 07-03-2013, 04:00 PM #11
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 13,529
- Blog Entries
- 7

- Rep Power
- 20

## Bookmarks