Simple Low Pass Filter without Signal Processing Toolbox

29 ビュー (過去 30 日間)
jb
jb 2014 年 5 月 27 日
コメント済み: Hui Puong 2021 年 2 月 8 日
Hi all,
I am facing a really stupid issue about filtering noises in a signal. I have to mention that the license bought by my company don't allow access to the signal processing toolbox.
To do so, I simply defined a low pass filter using the "filter" function as follows:
Heading = AllHeading{1,k}; % the signal to filter
Time = AllTime{1,k}; % the time vector
Tnoise = 10; % the cutoff period
Te = mean(Time(2:end)-Time(1:end-1)); % the sampling period
wt = Te/Tnoise; % the normalised cutoff frequency
Heading_f = filter(1,[1 -wt],Heading); % the filtered signal
I don't know if the transfer function that I defined is wrong or if I am missing some points, but the the signal isn't filtered and is just vertically moved, as if the mean value were increased...
Any help ?
JB
  1 件のコメント
Hui Puong
Hui Puong 2021 年 2 月 8 日
Hello, I wondering how can you apply your code on an excel file data that imported into Matlab with two variables named X and Y?
Thank you in advance

サインインしてコメントする。

回答 (2 件)

Image Analyst
Image Analyst 2014 年 5 月 27 日
You can use conv() to do linear filtering.

jb
jb 2014 年 5 月 27 日
Hi, thank you for your answer !
Sorry, I am close to be a "signal processing" dummy, but I thought I can't use the conv function for a IIR filter ?

カテゴリ

Help Center および File ExchangeDigital Filtering についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by