6 views (last 30 days)

Im new to matlab and im confused whether this is to be solved using autocorelation or fft.

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'

Opportunities for recent engineering grads.

Apply TodayFind the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
## 1 Comment

## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/617883-determine-periodicity-of-a-signal-x-t-4sin-2-pi-t-7-5-sin-2-pi-t-9#comment_1068358

⋮## Direct link to this comment

https://se.mathworks.com/matlabcentral/answers/617883-determine-periodicity-of-a-signal-x-t-4sin-2-pi-t-7-5-sin-2-pi-t-9#comment_1068358

Sign in to comment.