function y = filtfilthd(hd, x)

	if (strcmp(hd.type, 'chebyba'))
		error('Not Correct FilterType');
	    y = filtfilt(hd.b,hd.a,x);
        elseif (strcmp(hd.type, 'chebysos'))
            y = filtfiltsos(hd.sos, hd.g, x);
        end
	

end




function y = filtfiltsos(sos, g, x)

  y = sosfilt(sos,x);		       # forward filter
  y = flipud(sosfilt(sos,flipud(y))); # reverse filter
  y = y .* g .* g;
endfunction



