# Hello Everyone, I need to pass a low pass filter in this plot and I can't find the best way to do that. Someone can help me? Thanks.

1 view (last 30 days)
Rita Gama on 11 Oct 2021
Commented: Star Strider on 12 Oct 2021
Hello Everyone, I need to pass a low pass filter in this plot and I can't find the best way to do that. Someone can help me? Thanks.
I'm using this filter and I'm not getting any results
[b,a] = butter(8,0.1,'low');
y = filtfilt(b,a,pz);
##### 2 CommentsShowHide 1 older comment
Rita Gama on 11 Oct 2021
Yes.

Star Strider on 11 Oct 2021
Use the freqz function (or freqs linked to in that documentation page, if it is a continuous-time filter) —
[b,a] = butter(8,0.1,'low');
figure
freqz(b, a, 2^16)
Or, if the intent is the impulse response, the impz function —
figure
impz(b,a)
.
Star Strider on 12 Oct 2021
As always, my pleasure!
Thank you!
.

Walter Roberson on 12 Oct 2021
You are getting differences near the sharp edges.
[b,a] = butter(8,0.1,'low');
y = filtfilt(b,a,pz);
plot(pz, 'k.-', 'displayname', 'original');
hold on
plot(y, 'b+-', 'displayname', 'filtered');
hold off
legend show
xlim([6050 6199])
figure
plot(pz - y, 'displayname', 'pz-y')
legend show
##### 2 CommentsShowHide 1 older comment
Walter Roberson on 12 Oct 2021
I am having difficulty at the moment figuring out how a vector of values might correspond to values from a point cloud, so I am having difficulty judging what kind of noise might be present or what an effective way of reducing it might be.
The only idea I have come up with so far is that you might possibly be scanning a linear structure with pits, such as for CDs.