Decibel
function Decibel(cm){
 
if (document.spl.LdB.value != "") {
    xvrb[cm][1]=parseFloat(document.spl.LdB.value)
    xvrb[cm][2]=Math.pow(10,xvrb[cm][1]/20)*2e-5
 
    document.spl.P.value=xvrb[cm][2]
}
else {
    xvrb[cm][2]=parseFloat(document.spl.P.value)
    xvrb[cm][1]=20*Math.log(xvrb[cm][2]/2e-5)/Math.log(10)
    document.spl.LdB.value=xvrb[cm][1]
}
Page tags: javascript
page_revision: 2, last_edited: 1209110518|%e %b %Y, %H:%M %Z (%O ago)
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License