Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Simulated data to mimic your signal
- timeSamp = 1/64;
- nSample = 64;
- xAxis = linspace(0,1,nSample)';
- dataClean = sin(2*pi*xAxis*6);
- distAmpl = 1/10*( medfilt1(rand(nSample,1),3)+0.15);
- dataDist = data.*distAmpl + 0.01*(rand+10);
- % Half-axis FFT for a real signal
- [fftR,fftAxe] = FFTR(dataDist-mean(dataDist),timeSamp);
- % Display
- subplot(2,1,1)
- plot(xAxis,dataDist,'.-');grid on;axis tight
- xlabel('Time');ylabel('Amplitude');
- subplot(2,1,2)
- plot(fftAxe,fftR,'.-');
- xlabel('Frequency');ylabel('Amplitude');
- axis tight;;grid on
Add Comment
Please, Sign In to add comment