Function definitions are not permitted.... trying to make an FFT thing
2 ビュー (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
採用された回答
その他の回答 (2 件)
the cyclist
2012 年 1 月 26 日
I think instead of this
X = X(1/cutOff)
you meant this
X = X*(1/cutOff);
0 件のコメント
Walter Roberson
2012 年 1 月 26 日
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.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!