Irregularities in tone generated using FFT data I am implementing a simple program to generate tone in MATLAB using FFT/iFFT by zeroing all frequency bins except for the one frequency that I'd like to generate a tone in. 

Sampling frequency is 16000 Hz.
I am using a 32 point FFT which gives me 16 frequency bins. 

FFT data * Equalizer -> iFFT

If I want to generate a frequency of 1000 Hz, After FFT, using the Equalizer, I'd Zero all frequency bins except for frequency bin 2. This will generate a 1 kHz signal. 

If I want to generate a frequency of 4000 Hz, After FFT, using the Equalizer, I'd Zero all frequency bins except for frequency bin 8. This will generate a 4 kHz signal. 

I implemented this program.  Here are the results 

For 1 kHz,



For 2500 Hz,



For 5500 Hz, 



As you can see from the figure above, the 1 kHz is a clean signal. But as I try to generate higher frequencies, the signals are less smoother. The spectral figure shows that the correct frequency is generated, but i'm wondering if the irregularity is due to Harmonics or an other phenomena? 

So how can I generate a more clean signal in the higher frequencies ? And if possible also the reasoning behind these 'irregularities'?
The closer a synthesized frequency gets to half the sample rate, the better the reconstruction filter ones needs to reproduce a pure waveform.  It looks like your plotting application has a poor reconstruction (upsampling to plot points) filter, causing the resulting plot to look irregular when the signal frequency gets much above about 1/8th the sample rate.  A graph using polynomial, spline, or Sinc interpolation for the plot points would likely look much cleaner.