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);
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.