multiply a sawtooth wave form and sin wave together

조회 수: 5 (최근 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 CenterFile Exchange에서 Special Functions에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by