Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use family Filter response () #622

Closed
thefirecode opened this issue Jan 24, 2025 · 1 comment
Closed

How to use family Filter response () #622

thefirecode opened this issue Jan 24, 2025 · 1 comment

Comments

@thefirecode
Copy link

I cannot understand how to use them with FIR filters and get the frequency and phase response. My code example is below. How do I cast the variable "h" into type filter::FilterCoefficients{:z} that is what I am confused about what types are these can you give me an example?

#=
using DSP,ReadWriteDlm2

N=remezord(0.25,0.355, db2amp(0.1)-1, db2amp(0.25)-1)

h=remez(N,[(0.0, 0.25)=>1,(0.355,0.5)=>0])

H, w = freqresp(FIRFilter(h))
=#

@wheeheee
Copy link
Member

Duplicate of #511 and #185. This is a known issue, with this workaround:

H, w = freqresp(PolynomialRatio(h, 1))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants