powered by
convert between Hertz and Radians
rad(vec, samfreq = 20000, hz = TRUE)
A numerical vector of frequencies in Hz or radians
A single element numerical vector of the sampling frequency. Defaults to 20000 Hz
Logical. If TRUE, convert from Hz to radians otherwise from radians to hz
Jonathan Harrington
help
# 4000 Hz in radians at a sampling frequency of 8000 Hz rad(4000, 8000) # pi/2 and pi/4 radians in Hz at a sampling frequency of 10000 Hz rad(c(pi/2, pi/4), 10000, FALSE)
Run the code above in your browser using DataLab