How can I write a matlab program to do fft of a signal which I am gettig from a hot wire anemometer in the form of excel file.
3 views (last 30 days)
Show older comments
I want to write the program in MATLAB to do FFT of the signal which I am getting from hot wire anemometer. The signal is in the form of excel file having time in first column and velocity in second column.
I have written this and getting error
>> [X,B] = xlsread(data.xls’);
xdft = fft(X(:,2));
% sampling interval -- assuming equal sampling
DT = X(2,1)-X(1,1);
% sampling frequency
Fs = 1/DT;
DF = Fs/size(X,1);
freq = 0:DF:Fs/2;
xdft = xdft(1:length(xdft)/2+1);
plot(freq,abs(xdft))
??? [X,B] = xlsread(data.xls’);
|
Error: Missing variable or function.
1 Comment
dpb
on 5 Oct 2015
[X,B] = xlsread(data.xls’);
Unbalanced quotes in filename; use single quotes--
[X,B] = xlsread('data.xls');
Answers (0)
See Also
Categories
Find more on Fourier Analysis and Filtering in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!