필터 지우기
필터 지우기

Curve Fitting for FFT plot

조회 수: 5 (최근 30일)
nur yusof
nur yusof 2015년 7월 6일
편집: arun 2015년 7월 6일
Hi all,
I have data from accelerometer(time domain) and convert it to fft. Below is my coding and the plot.
%Clear clc;
%For Sampling Rate 512
c= Ch_512_60mss'; Track2=c(1,1:4096); Track1_X_Resolution=(1/512); Fs = (1/Track1_X_Resolution); L=4096;%16385;
% Sampling frequency t =(0:L-1)*1/Fs;% 0:1/Fs:2;
x = Track2; nfft = 2^nextpow2(L); % Next power of 2 from length of y
% Length of FFT % Take fft, padding with ze X = fft(x,nfft); X = X(1:nfft/2);
% Take the magnitude of fft of x mx = abs(X);
% Frequency vector f = (0:nfft/2-1)*Fs/nfft; % f1=fit(t,f,'fourier8');
% Generate the plot figure(1); plot(t,x); title('Sine Wave Signal'); xlabel('Time (s)'); ylabel('Amplitude'); figure(2); plot(f,mx); title('Power Spectrum of a Sine Wave'); xlabel('Frequency(Hz)'); ylabel('Power');
However I need to do the curve fit to the plot. Can somebody share with me the coding.I don't know how to do it.
Thanks a lot.
  댓글 수: 1
arun
arun 2015년 7월 6일
편집: arun 2015년 7월 6일
Fitting only "one curve" for this random data may spoil ur upcoming analysis. U shall try piecewise fit even shat is not good for noisy data.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by