These units are not compatible
Hello, I am trying to use this w(k) in my transfer function, but it doesn't work.
I can use w(k) separately.
Do you have any idea how can I do this?
Hello, I am trying to use this w(k) in my transfer function, but it doesn't work.
I can use w(k) separately.
Do you have any idea how can I do this?
As Werner says, that evaluation operator at the end of your function definition is the main culprit here.

Removing it cures the problem, and your function should work as you intend, provided fph has unit Hz (as both Werner and Terry said).
And just as an aside, because many new users find using range variables slightly confusing on occasion,

Note the -400 in the first definition; this is to ensure that hk's effective indices start at 0 (add ORIGIN to k-400 if you use a different ORIGIN).
Also, note the vectorized operator in the second definition; this is to ensure there are no unintended side effects from passing a vector to HPWRH. Many a head is scratched trying to work out why multiplying vectors v & w returns a scalar instead of an element-by-element product (especially when v^2 does return the square of each element of v).
Stuart
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.