changed tang functionality

when originally developed, tanh was not a matlab builtin.