
function HPSignal = highpass (Signal, FCutoff, NOrder)
%
%  FUNCTION HIGHPASS (SIGNAL, FCUTOFF, NORDER)
%
%  DESCRIPTION
%    Highpass filtering of time sequence.
% 
%  PARAMETERS
%    Signal  - Time sequence
%    FCutoff - Cutoff frequency (relative to Nyquist freq.)
%    NOrder  - Order of filter
%
%  ... Drs. P. ..
%
if nargin<3
   NOrder = 100;
end

f = [0.0 FCutoff FCutoff 1.0];
m = [0.0 0.0 1.0 1.0];
b = fir2(NOrder,f,m);

HPSignal = filtfilt (b, 1, Signal);

 