function [output, H, h]=high_pass(input, freq, sample_rate, N)
%high pass filter
%freq: the cutoff frequency
%sample_rate: the number of samples per second
%H: Transfer function (complex) in frequency domain
%h: Impulse response in time domain
%N: the order of filter


Wn=2*freq/sample_rate;  %cutoff frequency
[B,A]=butter(N,Wn,'high');  %butterworth low-pass filter
output=filter(B,A,input);  %the output of the Filter

H=freqz(B,A,sample_rate/2);
h=impz(B,A);
