Function definitions are not permitted.... trying to make an FFT thing
Mostrar comentarios más antiguos
Function definitions are not permitted.... trying to make an FFT thing
I'm trying to get this working
close all
clear all
function[X,freq]=positiveFFT(x,Fs);
N=length(x);
k=0:N-1;
T=N/Fs;
freq=k/T;
X=fft(x)/N;
cutOff = ceil(N/2);
X = X(1/cutOff);
freq = freq(1:cutOff);
Any ideas?
Respuesta aceptada
Más respuestas (2)
the cyclist
el 26 de En. de 2012
I think instead of this
X = X(1/cutOff)
you meant this
X = X*(1/cutOff);
Walter Roberson
el 26 de En. de 2012
0 votos
You should think of "clear all" as being like trying to reprogram the fuel injector computer on a car: if you don't have years and years of training, you probably should not even be considering doing it.
Categorías
Más información sobre Frequency Transformations en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!