How can i derive fundamental and harmonic form from this fourier transform result?

1 view (last 30 days)
Hi. I did fourier transform but only i can get is the graph of transformation.
I have to get the fundatmental + harmonic form of given function..how can i get it?
data = csvread('data.csv',1);
t = data(:,1);
x = data(:,2);
ts=0.00005;
fs=1/ts;
N=length(x);
k=-N/2:N/2-1;
f=fs*k/N;
X=fft(x,N);
figure
subplot(2,1,1)
plot(t,x);
xlabel('Time')
ylabel('Amplitute')
title('before')
grid on
subplot(2,1,2)
plot(f,abs(fftshift(X))/N);
xlabel('Frequency')
ylabel('Amplitute')
title('after')
grid on

Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!