# Why does the FILTFILT documentation not mention the effects of truncation

Why does the FILTFILT documentation not mention the effects of truncation, while providing a short input sequence to an IIR filter ?

I am using the FILTFILT function to plot the magnitude response. I observe a truncated output when using a short delta sequence.

However, if I increase the filter order or the length of the input sequence, I get an improved response. The documentation does not provide any information regarding this.

Matlabsolutions.com provide latest MatLab Homework Help,MatLab Assignment Help for students, engineers and researchers in Multiple Branches like ECE, EEE, CSE, Mechanical, Civil with 100% output.Matlab Code for B.E, B.Tech,M.E,M.Tech, Ph.D. Scholars with 100% privacy guaranteed. Get MATLAB projects with source code for your learning and research.

Documentation on the FILTFILT function is missing important information regarding its performance.

Here is additional information on the FILTFILT function.

The length of the input ‘x’ must be more than three times the filter order, defined as max(length(b)-1,length(a)-1). The input should be sufficiently large so that the impulse is correctly represented.

As an example, for a fifth order filter, if the input sequence is a delta sequence, the ‘1’ should appear anywhere within the first 15 samples.

`close all;[b,a] = butter(5,0.5); % a = 1;delta = [zeros(2,1);1;zeros(100,1)]; % Short Input vectory_short = filtfilt(b,a,delta);Y_short = fft(y_short,2048);delta_long = [zeros(1024,1);1;zeros(1023,1)]; %Long Input vectory_long = filtfilt(b,a,delta_long);Y_long = fft(y_long,2048);`

--

--

## More from Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.

Love podcasts or audiobooks? Learn on the go with our new app.

## Technical Source

Simple! That is me, a simple person. I am passionate about knowledge and reading. That’s why I have decided to write and share a bit of my life and thoughts to.