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 件)
Ameer Hamza
2020 年 11 月 29 日
0 投票
You can use findpeaks(): https://www.mathworks.com/help/signal/ref/findpeaks.html or islocalmax(): https://www.mathworks.com/help/matlab/ref/islocalmax.html
1 件のコメント
Elnur Shahbalayev
2020 年 11 月 29 日
編集済み: Elnur Shahbalayev
2020 年 11 月 29 日
カテゴリ
ヘルプ センター および File Exchange で Hamming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!