Need help with butterworth function
조회 수: 11 (최근 30일)
이전 댓글 표시
I am trying to use the butterworth function and I can't seem to get it working. Here is my code:
clear,clc
load('DATA_01_TYPE01.mat')
A = sig;
x = A(2,1:1000)
t=1:1:1000;
subplot(3,1,1)
plot(t,x)
N=size(x,2);
noise=0.5*randn(1,N); %noise
[b a]=butter(2, [0.6 0.7]);
noise=filter(b,a,noise);
x_n=x+noise;
subplot(3,1,2)
plot(t,x_n)
댓글 수: 0
답변 (1개)
Star Strider
2018년 10월 26일
편집: Star Strider
2018년 10월 26일
I assume ‘A’ or ‘x’ is the signal you want to filter. If so, you are not giving it to the filter function to use. You are only giving it your ‘noise’ vector, so that it what it is filtering.
댓글 수: 4
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!