# hz2bark, bark2hz

< Programmer Guide | Command Reference | EVAL

Jump to navigation
Jump to search
Convert all elements of *x* from Hertz to Bark and vice versa.

- Usage
`hz2bark(`

`x`)`bark2hz(`

`x`)`x`- a scalar, vector or matrix

- Result
- The result
*r*has the same type as*x*and contains the converted elements of*x*.**hz2bark**- Uses the algorithm published by Zwicker and Fastl (1990) to convert frequencies from Hz to Bark:
*r*_{i,j}= 13 * atan(0.76**x*_{i,j}/1000) + 3.5 * atan((*x*_{i,j}/7500)^2)**bark2hz**- Because the above formula is not directly invertable, an iteration algorithm is used to convert the
*x*_{i,j}from Bark to the result*r*_{i,j}in Hz.

- Note: Both functions are also available in the expressions used in the NUM and INT command.
- See also
- hz2mel, mel2hz, hz2erb, erb2hz, hz2cent, cent2hz, hth, lin2log, log2lin