# Any guidance on converting Time Domain to Frequency Domain in Matlab

Below is the graph of my load cell readings at 3 samples per second. I have collected 500 such samples. I want to stabilize the readings and read that first approach is to convert time domain data to frequency domain. I am new to DSP, so i seek your expert guidance on this.

My main aim is to stabilize the readings so that i can increase an accuracy of my measuring device.

Graph after fft is as shown below

• If you wanna convert time domain to frequency domain, try the example here. mathworks.com/help/matlab/math/fft-for-spectral-analysis.html If you wanna stabilize your signals (maybe you should define/understand the properties of noises and signals), kalman filters are commonly utilized tool. mathworks.com/help/control/ug/kalman-filter-design.html Feb 23 at 5:13
• Great link. Thanks for that. I have another question in the code it is mentioned Y = fft(y,251); Why the author has taken 251 ? Any special reason? Feb 23 at 5:47
• @Nimit. The author used Y = fft(y,251) because the 'y' sequence has 251 samples. The author could just as well have used Y = fft(y). Feb 23 at 8:37
• @RichardLyons Ok thanks... Let me do fft and post the graph... After fft graph i think i should get my signal frequency.. Feb 23 at 8:53
• @RichardLyons I have edited my question and uploaded the graph... Matlab code for fft is Y = fft(y,500); Pyy = Y.*conj(Y)/500; f = 3/500*(0:127); plot(f,Pyy(1:128)) title('Power spectral density') xlabel('Frequency (Hz)') Feb 23 at 9:42