write a mathlab code to generate a sinusoidal signal with a random frequency 𝑋(𝑡) = 𝑐𝑜𝑠(2𝜋𝐹𝑡), where F is a random variable uniformly distributed over some interval (0, 𝑓0).
2 ビュー (過去 30 日間)
古いコメントを表示
this is little bit tricky so i am trying to code the following problem but i am not able to slove is can i get any help??
0 件のコメント
回答 (1 件)
David Hill
2022 年 11 月 19 日
f0=5;
x=@(t)cos(2*pi*f0*rand*t);
t=0:.001:pi/4;
plot(t,x(t))
2 件のコメント
Walter Roberson
2022 年 11 月 20 日
Or to be slightly clearer in terms of the original requirements:
F = rand() * f0; %random frequency 0 to f0
x = @(t)cos(2*pi*F*t);
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
