R/wavelength.R

Defines functions wavelength

wavelength <- function(frequency, speed=soundSpeedMedium("air"), unit="m") {
  if (unit == "m") {
    return (speed/frequency)
  }
  if (unit == "cm") {
    return (100 * speed/frequency)
  }
  stop("Invalid unit selction: ", unit)
}

Try the sonicscrewdriver package in your browser

Any scripts or data that you put into this service are public.

sonicscrewdriver documentation built on May 2, 2021, 5:06 p.m.