Determine the frequency with find and diff

I have the problem to find the frequencies where peaks occur. Here is the question:
Here is my solution for part a and I need to find out frequencies at which the peaks occur. Thanks in advance for your help. I gave a try a bit for part b but still could't get the result.
% Question 3
N = 2^10;
delta_t = 2*pi/4*40*pi;
%finding Period T from N - number of cycles, delta_t - change of time
T = delta_t/N
%part a
n = [1 2 3 4]
omega = [10*pi 18*pi 18.8*pi 40*pi]
fi = [0.1 0.04 0.04 0.03]
H = [1 1.3 1.3 1.8]
syms n
f1 = symsum(exp(-fi.*omega*t).*sin(sqrt(1-(fi).^2).*omega*t),n, 1, 4)
subplot(1,2,1)
fplot(f1)
f2 = symsum(H.*exp(-fi.*omega*t).*sin(sqrt(1-(fi).^2).*omega*t),n, 1, 4)
subplot(1,2,2)
fplot(f2)

回答(1 个)

1 个评论

Thank you so much for your answer. I tried them before but couldn't get answer. If possible please can you show with code? Thanks in advance again!

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by