How to filter a signal with lowpass/highpass?
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi all,
I am completely new in this field. Therefore, I need some help from the scratch.
According to a protocol, I have to filter a signal at 1.2 kHz ("the current derivative (of the signal) was addicionally filter at 1.2 kHz (sic)).
I've tried to filter the signal using the funtion lowpass:
y = lowpass(x,fpass,fs) %specifies that x has been sampled at a rate of fs hertz. fpass is the passband frequency of the filter in hertz)
x is my data, fpass is 1200 (1.2 kHz), but fs? I've checked the protocol and I've found this: "current signals were filtered at 2 kHz and digitized gap-free at 25 kHz."
So, what is the fs in my case? 2000, 25000, or 27000 (2000 + 25000)?
My main question is: how can I filter the signal at 1.2 kHz?
I've attached the data (Trial file). There are two variables (1x26 double), Time (s) and Intensity (pA). Plot it as (Time,Intensity).
Many thanks,
Jose
댓글 수: 0
채택된 답변
Star Strider
2020년 3월 26일
The easiest way to determine the sampling frequency is to measure it:
D = load('trial1.mat');
A = D.Intensity;
t = D.Time;
Ts = mean(diff(t)); % Sampling Interval
Fs = 1/Ts; % Sampling Frequency
The sampling frequency is 6250 (Hz, assuming ‘t’ is in seconds), and appears to have been sampled regularly (i.e. the sampling intervals are essentially identical). Define the passband of a filter so long as it is less than the Nyquist frequency, Fs/2, so a passband or stopband of 1.2kHz is possible.
I have no idea what ‘...current signals were filtered at 2 kHz and digitized gap-free at 25 kHz.’ means. You have to sort that.
댓글 수: 10
Star Strider
2020년 3월 29일
To the best of my knowledge, it would be necessary to load all the files and then search each file for the variables of interest. I doubt that there is any other way to determine that.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Digital Filter Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!