How to find frequency components from a signal?
Mostrar comentarios más antiguos
Respuesta aceptada
Más respuestas (1)
clear all;
clc;
i=sqrt(-1);
e=exp(1);
F=input('Input X and Y in matrix form (nX2) = ');
tmp=size(F);
N=tmp(1,1)
F_sample=1/(F(3,1)-F(2,1))
x=[];
y=[];
for k=0:1:120
x=[x k];
f=0;
for j=1 : N
f=f + F((j),2)*e^(-i*2*pi*k*(j)/N);
end
f=abs(f);
y=[y f];
end
plot(x,y);
% stem(x,y);
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!