Filtering in matlab is a two step process. First, you have to design the filter that you want to use. Then, you use the filter on your data. Assuming your sampling frequency is in the variable Fs, and your desired cutoff frequency is Fc, then the most simple filter command would be these two lines:
[b,a] = butter(1, Fc/Fs);
filtered_data = filter(b,a,data);
The variables b and a represent the coefficients of the filter in transfer function format. You can basically ignore the actual values for now.
To perform highpass filtering, just design the filter this way:
[b,a] = butter(1, Fc/Fs, 'high');
and for bandpass filtering, specify a vector of upper and lower cutoff frequencies.
[b,a] = butter(1, [Fc1 Fc2] /Fs, );