help in plot of sin

2 ビュー (過去 30 日間)
asaf kamer
asaf kamer 2020 年 8 月 7 日
回答済み: Alan Stevens 2020 年 8 月 7 日
I do not get a sinus wave
>> f=10;
t=[0:1/(f*5):1/(f*0.5)];
teta=round(100*rand);
y1=sin(2*pi*f*t);
y2=sin(2*pi*f*t+deg2rad(teta));
figure(teta);
plot(t,y1,t,y2)
xlabel('x')
ylabel('y')
grid

回答 (1 件)

Alan Stevens
Alan Stevens 2020 年 8 月 7 日
Try
t=0:1/(f*50):1/(f*0.5);
instead of
t=0:1/(f*5):1/(f*0.5);

カテゴリ

Help Center および File ExchangeSignal Processing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by