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

1 view (last 30 days)
Rama a on 5 Jun 2021
Answered: Chunru on 6 Jun 2021
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 on 6 Jun 2021
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.