# frequency response matching

Started by January 16, 2008
Hello!

I've got a basic? question regarding filtering.

The goal with the filtering is to match four frequency response source
curves against two target curves.

Let us call the target curves goal1 and goal2 and the source curves
source1, source2, source3 and source4.

What I would like to do (I think!) is to solve the equation system
below. That is, for a specific frequency 0 < f < fs/2

source1(f) * h1(f) + source2(f) * h2(f) = goal1(f)
source3(f) * h1(f) + source4(f) * h2(f) = goal2(f)

The idea is to create these "compensation" vectors h1, and h2 and
thereafter use them as input arguments to for example the fir2,
fdesign.arbmag or fdesign.arbmagnphase functions in matlab.

As a beginner I'm a bit unsure wether this is a correct approach. If
only cosidering the magnitude by using the absolute values elements in
h1, and h2 can be negative which feels wrong as the filter won't be
able to subtract a signal, only amplify or attenuate the signal.