Approximate a System Frequency Response with a Filter in MATLAB suppose I know the frequency response of a (linear) model approximating a real physical system but only at a specific frequency $f_0$ (so basically I have a complex number whose module is the magnitude response and the phase is the phase response).

In Matlab I want to filter a sinusoidal signal whose frequency is $f_0$ by a filter that approximates the response of my system at $f_0$ without altering the other frequencies. The filtering process must be done simulating the on-line behaviour, assuming that the next samples of the signal are unknown.

In other words my question is this: how can I build a filter whose behaviour at $f_0$ is the same of my system and does not modify the other frequency components?

The motivation I am asking this is that I need to perform some transformations on the frequency response at $f_0$ of the real system exploiting the results of the Singular Value Decomposition performed on the frequency response at $f_0$ of the identified (linear MIMO) model that approximates the real system.

Thanks in advance
Convolve the input signal with (Real Part) harmonic signal $ \alpha {e}^{-2 \pi i {f}_{0} t + \phi} $.
Let's call this output as $ {y}_{1} $.
The parameters $ \alpha $ and $ \phi $ are from your reference system response.

This will give you the output of the reference system on your input signal only at your desired frequency.

Now convolve the input signal with (Real Part) harmonic signal $ 1 {e}^{-2 \pi i {f}_{0} t} $.
Let's call this output as $ {y}_{2} $.
This will extract this component of your input signal.

Calculate $ {y}_{3} = {y}_{1} - {y}_{2} $ and all you need is to add $ {y}_{3}  $ to your signal.

There are trickier and more efficient way to do so.
Yet I wanted to keep it simple and intuitive.