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!