design a filter without any toolboxes
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
i want to design a filter without use any toolboxes. I have some question about it: If i would like to add to the filter, that for example pass between 123 - 456 Hz with -2.35 dB attenuation, and the other parts shall be maximum damping, what should i do? Where do i find out, that how much attenuation i get on the other parts? Where do i specify the filter vector? Where they appear in the logic design of the filter types and where to bring the decision whether to use XY type of filter design? I need some help about this.
i made a random characteristics filter like this:
clear; clc;
%% %read the original wav file [fname,dirpath]=uigetfile('*.wav'); [Wsize,Fs,Bits]=wavread([dirpath,fname],'size'); [y, Fs]=wavread([dirpath,fname]); %FS sample rate sound(y, Fs); %% %%analyze the signal
T = 1/Fs; % Sample time L = numel(y); % Length of signal NFFT = 2^nextpow2(L); % Next power of 2 from length of y Y = fft(y); % calculate the original signals fft f = Fs/2*linspace(0,1,NFFT/2+1); %The all frequencies
%% %filter the DFT signal with random numbers
%generate random numbers for predefined amplitude characterics rands = flipdim(rand(1,L)',1);
% the randoms are from 0hz to 'f' hz Y_w1 = (Y.*rands);
% plot the original and the weight DFT signals hold all
%filtered signal plot(f, abs(2*(Y_w1(1:NFFT/2+1)))); %original signal plot(f, abs(2*(Y(1:NFFT/2+1)))); title('Amplitude Spectrum of y(t)') xlabel('Frequency (Hz)')
y_w = (real(ifft(Y_w1)));
sound(y_w, Fs);
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Digital Filter Analysis finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!