FFT Function not working with multiple columns
显示 更早的评论
I am trying to analyze data that I recorded from the Force Sensitive Resistors (FSRs) coded on Arduino through data streamer on excel. I used four FSRs, so there are 4 columns of data over a set of time (1200 rows, 12 seconds). I seperated time from the FSR data so that I can graph the FFT of the FSR data against the time.
But I get very strange graphs when I get the plot back (Attached below)
For each single column of data, I get a bunch of lines instead of one.
Can someone tell me how I can see the frequency of the FSR data?
X = xlsread('botdata.csv');
t = xlsread('botdatatime.csv');
Y = fft(X);
plot(X,Y);
4 个评论
you need to form a frequency vector for your x axis, at the moment your x values are the FSR amplitude data which does not make sence. have a look into the fft description hoe to form the frequency vector from your time vector
try to plot (-50:1/12:50-1/12) at the x axis and y axis you use fftshift(abs(fft(X))/length(t)). i hope i remeber that correctly....
Raidah Zaman
2021-4-30
Raidah Zaman
2021-4-30
Raidah Zaman
2021-4-30
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Multirate Signal Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
