Determine periodicity of a signal x(t)=4sin (2 pi t /7 )+ 5 sin (2 pi t/9)
7 views (last 30 days)
Show older comments
Im new to matlab and im confused whether this is to be solved using autocorelation or fft.
1 Comment
KSSV
on 18 Oct 2020
You have to use fft. You have example inthe doc, you can easily do it on youe self.
Answers (1)
Image Analyst
on 18 Oct 2020
This is not a MATLAB question. It doesn't even need fft or correlation. If you do FFt, you'll simply see two spikes, one for one signal and one for the other signal. It's just basic math. Since the period of one is 7 and the other is 9, what do you think the repeat period would be? Don't think about spectra or programming. Just think about things like least common multiple or whatever.
If you want MATLAB code to visualize the signal, here it is:
t = linspace(0, 63 * 4, 1000); % Four repeated cycles
x = 4 * sin(2 * pi * t / 7) + 5 * sin(2 * pi * t / 9);
plot(t, x, 'b-', 'LineWidth', 2);
grid on;
xlabel('t', 'FontSize', 15);
ylabel('x', 'FontSize', 15);
for k = 0 : 63 : max(t)
xline(k, 'Color', 'r', 'LineWidth', 2);
end
g = gcf;
g.WindowState = 'maximized'
See Also
Categories
Find more on Spectral Measurements 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!