필터 지우기
필터 지우기

i want to filter a frequeny

조회 수: 2 (최근 30일)
mouh nyquist
mouh nyquist 2014년 11월 6일
댓글: mouh nyquist 2014년 12월 4일
Hi all,
I write because I'm trying to do filtering in maltab.
in the code below I have a signal which is composed of two sinus of frequencies 0.3Hz and 2Hz.
I'd like to do is filter the sinus 2Hz the code below does not kidnapped this signal's component ...
you know where it comes from?
clear all;close all;clc;
%%original
t = 0:0.01:10;
y = sin(2*pi*0.3*t)+sin(2*pi*2*t);
%%filter
fs = 1000;
fcoupure = 2*[1 3]/fs;
[b]=fir1(1,fcoupure,'stop');
yfilter=filter(b,1,y);
figure (1);hold on;plot(t,y);plot(t,yfilter,'r');
%%butterworth
fs = 1000;
fcoupure = 2*[1 3]/fs;
[b,a]=butter(1,fcoupure,'stop');
yfilter=filter(b,a,y);
figure (2);hold on;plot(t,y);plot(t,yfilter,'r');
help me with any method not only butter

채택된 답변

Rick Rosson
Rick Rosson 2014년 11월 7일
  댓글 수: 2
Andrew Reibold
Andrew Reibold 2014년 11월 7일
편집: Andrew Reibold 2014년 11월 7일
Did you read the doc? #doit4me
mouh nyquist
mouh nyquist 2014년 12월 4일
thank you

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by