필터 지우기
필터 지우기

my attempt to generate and plot some signals.. please tell me whats wrong here!

조회 수: 2 (최근 30일)
these are the signals:
x1(t) = sin(10*pi*t ) , x2(t)=(1/3) sin(30*pi* t) , x3(t) = ( 1/5) sin(50* pi * t )
Generate and plot x1(t) for one period ,
Generate and plot xb(t)=x1(t)+x2(t) for one period ,
Generate and plot xc(t)=x1(t)+x2(t) +x3(t) for one period.
(Show all the results on one figure using subplot)
**Determine, using Matlab plots, if the generated signals are periodic or not.
below is my code .. please check it and also tell me how to solve this point
(Determine, using Matlab plots, if the generated signals are periodic or not.)
syms x1 x2 x3 m n t;
x1=sin(10.*pi.*t);
x2=(1/3)*sin(30.*pi.*t);
x3=(1/5)*sin(50.*pi.*t);
xb=x1+x2;
xc=x1+x2+x3;
subplot(2,2,1);
fplot(x1,[0 0.004]);
xlabel('t');
ylabel('x1(t)');
title ('x1=sin(10.*pi.*t)');
subplot(2,2,2);
fplot(xb,[0 0.004]);
xlabel('t');
ylabel('xb(t)');
title ('xb= x1+x2');
subplot(2,2,[3 4]);
fplot(xc,[0 0.004]);
xlabel('t');
ylabel('xc(t)');
title ('xc=x1+x2+x3')

채택된 답변

Chunru
Chunru 2021년 6월 6일
The period of your signals, x1, xb and xc, is 1/5 (5 is the frequency for x1). If you change the 0.004 into 1/5, you should have 1 period of the signals plotted.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by