how do i plot this waves ?

4 ビュー (過去 30 日間)
almog atiya
almog atiya 2017 年 11 月 3 日
コメント済み: Ahmed sazzad 2020 年 10 月 18 日
hi im new in matlab and i need to plot the next waves and i have no idea how to start, i tried and the result didnt look good.
the waves :
1. sine wave, Vp=2V, f=1.5kHz, DC=0V
2. triangle wave, Vp=50mV, f=5kHz, DC=0V
3. square wave, Vptp=5V, f=12kHz, DC=2.5V
4. square wave, Vmin=0V, Vmax=5V, f=80kHz, duty cycle=75%
5. sawtooth wave, Vptp=5V, f=10kHz, DC= -3V
thank you for your help ! :)

採用された回答

Birdman
Birdman 2017 年 11 月 3 日
編集済み: Birdman 2017 年 11 月 3 日
t=0:0.001:10;
%sine wave
sinewave=2*sin(1500*t);
%square wave Vptp=5v DC=2.5V
squarewave1=2.5+2.5*square(12000*t);
%triangle wave
trianglewave=0.25+0.25*sawtooth(5000*t);
%square wave f=80kHz
squarewave2=2.5+2.5*square(80000*t);
%sawtooth wave
sawtoothwave=-3+2.5*sawtooth(10000*t);
plot(t,sinewave)
%same plot command can be applied for any of them, get closer in figures to
%see the waves since their frequencies are high
If you want to see from a broader perspective, increase the increment of t, like 0.1.
  1 件のコメント
Ahmed sazzad
Ahmed sazzad 2020 年 10 月 18 日
squerwaves are not working correctly.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by