Separate and plot individual filter responses
I am trying to create a plot similar to the attached image! I want to see the individual response each filter gives while displaying the center frequency of that filter on the y, adding together all of the responses at the top. I want to do this to display how much each filter is contributing and where it is most active. I was trying to use plot with CenterFreqs as my y but keep getting errors. This is what I have:
% Parameters
fs = 16e3;
t = 0:(1/fs):0.03;
t = t(:); % ensure column vector
numFilts = 32;
signal_freq = 100; % frequency of input signal
range = [50 8000];
gammaFiltBank = gammatoneFilterBank(range, numFilts, fs); % set fs explicitly
% Generate input signal
A=1;
input_signal = A*sin(2*pi*signal_freq*t);
% Get the center frequencies of the filters
CenterFreqs = getCenterFrequencies(gammaFiltBank);
% Process the input signal through the selected filters
output_signal = gammaFiltBank(input_signal);
Thank you for your time!I am trying to create a plot similar to the attached image! I want to see the individual response each filter gives while displaying the center frequency of that filter on the y, adding together all of the responses at the top. I want to do this to display how much each filter is contributing and where it is most active. I was trying to use plot with CenterFreqs as my y but keep getting errors. This is what I have:
% Parameters
fs = 16e3;
t = 0:(1/fs):0.03;
t = t(:); % ensure column vector
numFilts = 32;
signal_freq = 100; % frequency of input signal
range = [50 8000];
gammaFiltBank = gammatoneFilterBank(range, numFilts, fs); % set fs explicitly
% Generate input signal
A=1;
input_signal = A*sin(2*pi*signal_freq*t);
% Get the center frequencies of the filters
CenterFreqs = getCenterFrequencies(gammaFiltBank);
% Process the input signal through the selected filters
output_signal = gammaFiltBank(input_signal);
Thank you for your time! I am trying to create a plot similar to the attached image! I want to see the individual response each filter gives while displaying the center frequency of that filter on the y, adding together all of the responses at the top. I want to do this to display how much each filter is contributing and where it is most active. I was trying to use plot with CenterFreqs as my y but keep getting errors. This is what I have:
% Parameters
fs = 16e3;
t = 0:(1/fs):0.03;
t = t(:); % ensure column vector
numFilts = 32;
signal_freq = 100; % frequency of input signal
range = [50 8000];
gammaFiltBank = gammatoneFilterBank(range, numFilts, fs); % set fs explicitly
% Generate input signal
A=1;
input_signal = A*sin(2*pi*signal_freq*t);
% Get the center frequencies of the filters
CenterFreqs = getCenterFrequencies(gammaFiltBank);
% Process the input signal through the selected filters
output_signal = gammaFiltBank(input_signal);
Thank you for your time! center, frequency, plot MATLAB Answers — New Questions