multiply a sawtooth wave form and sin wave together

7 ビュー (過去 30 日間)
Andrew Bills
Andrew Bills 2019 年 4 月 12 日
コメント済み: Andrew Bills 2019 年 4 月 13 日
Me and my friend are trying to multiply the sawtooth wave form and sin wave together. could someone help us with this command below is a photo of the multisim file we are try to recreate in matlab.
x = sawtooth(2*pi*50*t);
x1 = sin(pi/4*t+pi/2);
z=x.*x1;

採用された回答

Mark Sherstan
Mark Sherstan 2019 年 4 月 12 日
You just need to define a time array. This should work for you:
t = 0:pi/12:2*pi;
x = sawtooth(2*pi*50*t);
x1 = sin(pi/4*t+pi/2);
z=x.*x1;
plot(t,x,t,x1,t,z)
legend('sawtooth','sine wave','combined')
  1 件のコメント
Andrew Bills
Andrew Bills 2019 年 4 月 13 日
Thank you so much. The website stack overflow is useless. I'm so thankfull for other fourms.

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by