rad | R Documentation |
convert between Hertz and Radians
rad(vec, samfreq = 20000, hz = TRUE)
vec |
A numerical vector of frequencies in Hz or radians |
samfreq |
A single element numerical vector of the sampling frequency. Defaults to 20000 Hz |
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.