Delete frequency components with FFT and IFFT
In fact, deleting a certain frequency range from the FFT equals settings these frequency components to zero. Hence, you end up with the following code:

N = 1000;
signal = randn(N, 1);

N_clear = 490;

% Remove the calls to fftshift, if you want to delete the lower frequency components
S = fftshift(fft(signal));   
S_cleared = S;
S_cleared(1:N_clear) = 0;
S_cleared(end-N_clear+2:end) = 0;
S_cleared = fftshift(S_cleared);

signal_cleared = ifft(S_cleared);

subplot(2,2,1);
plot(signal);
title('input signal');

subplot(2,2,2);
plot(abs(S));
title('input spectrum');

subplot(2,2,3);
plot(abs(S_cleared));
title('output spectrum');

subplot(2,2,4);
plot(signal_cleared);
title('output signal');


As you can see, the input signal is very quickly varying. Then, after filtering out almost all higher frequency parts, you end up with a smooth signal. 

Note, that normally you use FIR/IIR lowpass/highpass filters for realtime-signal processing, because the FFT is block-based and cannot produce nice transitions between the processed blocks.