Info
This question is closed. Reopen it to edit or answer.
How can I know/represent the frequency of my signal on a plot after applying fft function to my signal?
1 view (last 30 days)
Show older comments
I am collecting data from a sensor to MATLAB at 55Hz of sampling frequency.I want to know the actual frequency.Because the fft function does not seem like showing the frequency. My code:
clc
clear all
a = arduino('COM5','Mega2560')
fs=55;
Ts=1/fs;
t=0:Ts:6;
count=0
for c=0:Ts:6
count=count+1;
z1(count)=readVoltage(a,'A3');
y1(count)=readVoltage(a,'A4');
x1(count)=readVoltage(a,'A5');
x2(count)=readVoltage(a,'A0');
y2(count)=readVoltage(a,'A1');
z2(count)=readVoltage(a,'A2');
end
j=fft(z2);
plot(abs(j))
Can any one help me with that, I will be thankful
0 Comments
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!