How to generate variable sine wave after fixed number of samples
3 ビュー (過去 30 日間)
古いコメントを表示
guduguntla sai shankar
2016 年 2 月 21 日
コメント済み: guduguntla sai shankar
2016 年 3 月 6 日
i have to generate a sine wave increasing its frequency about 50khz after certain periods(like it should generate 25 periods of 50 khz and 25 periods of 100khz and go on...) until 1Mhz. Thanks in Advance
0 件のコメント
採用された回答
Azzi Abdelmalek
2016 年 2 月 21 日
np=25
f=50
t=0:T/10:T;
y=sin(2*pi*f*t);
for k=1:19
f=f+50;
T=1/f;
t1=t(end)+T/20:T/20:t(end)+np*T;
y1=sin(2*pi*f*t1);
t=[t t1];
y=[y y1];
end
plot(t,y)
3 件のコメント
Azzi Abdelmalek
2016 年 2 月 21 日
T is the period of your sine wave, and yes you can save this signal in a mat file, and use the from file block in simulink
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!