# Lowpass filter with own cutoff frequency and y axis in dB.

16 visualizaciones (últimos 30 días)
Reji G el 5 de Mayo de 2022
Comentada: Reji G el 11 de Mayo de 2022
I wnat to design a Lowpass filter in which I can choose my own cutoff frequency and y axis in dB. I have a signal in time domain.
##### 2 comentariosMostrar NingunoOcultar Ninguno
Star Strider el 5 de Mayo de 2022
Reji G el 5 de Mayo de 2022
It doesn't works as expected.

Iniciar sesión para comentar.

### Respuestas (1)

Bhavana Ravirala el 9 de Mayo de 2022
Hi Reji,
I understand that you are trying to implement a low pass filter. Using the "lowpass" command in MATLAB output signal from a lowpass filter can be obtained.
Example:
fs = 0.1; % sampling frequency of input signal
t= 0 : 1/fs : 1;
x= sin(2*pi*50*t); % input signal
lowpass(x,3, fs); % setting the higher cutoff frequency as 3Hz
##### 5 comentariosMostrar 3 comentarios más antiguosOcultar 3 comentarios más antiguos
Bhavana Ravirala el 11 de Mayo de 2022
Hi Reji
From your explanation, I understand that you are trying to implement lowpass filtering to a signal having mixed frequencies.
Example:
Fs = 5*10^7;
t = 0:1/Fs:0.001;
signal = [10*sin(2*pi*50*t(1:10000)) 2*cos(2*pi*2000*t(10001:20000)) 12*sin(2*pi*60000*t(20001:30000)) 3*cos(2*pi*(10^7)*t(30001:end))]; % signal with mixed frequencies
%Now you may try out using multiple cutoff frequencies:
lowpass(signal, 20000, Fs);
lowpass(signal, 200000, Fs);
lowpass(signal, 20000000, Fs);
The power spectrum generation is as the expected outcome.
Reji G el 11 de Mayo de 2022
Thank you.
I need x axis in frequency and y axis in dB.
My requireement is:
If my cutoff frequency is 100Hz then, the value of y axis corresponds to 100 Hz(in x axis) should be "-3dB". How to plot the graph in this way ?

Iniciar sesión para comentar.

### Categorías

Más información sobre Signal Processing Toolbox en Help Center y File Exchange.

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by