0% found this document useful (0 votes)
5 views2 pages

Triangular

The document describes the generation and plotting of triangular, sinc, and exponential functions as continuous and discrete time signals. It includes MATLAB code snippets for creating these signals and visualizing them using plots and stems. Each function is labeled according to its characteristics, such as alpha values for the exponential function.

Uploaded by

a7626617
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Triangular

The document describes the generation and plotting of triangular, sinc, and exponential functions as continuous and discrete time signals. It includes MATLAB code snippets for creating these signals and visualizing them using plots and stems. Each function is labeled according to its characteristics, such as alpha values for the exponential function.

Uploaded by

a7626617
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

6.

Triangular:
Continuous time signal Discrete time signal
t=-5:0.01:5; n=-5:1:5;
x=zeros(1,length(t)); x=zeros(1,length(n));
i=1; i=1;
for k=-5:0.01:5; for k=-5:1:5;
if k< -1 if k< -1
x(i)=0; x(i)=0;
else if k>1 else if k>1
x(i)=0; x(i)=0;
else else
x(i)=1-abs(k); x(i)=1-abs(k);
end end
end end
i=i+1; i=i+1;
end end
plot(t,x); stem(n,x);
xlabel('t'); axis([-5 5 -2 2]);
ylabel('x(t)'); xlabel('n');
title('Triangular ct'); ylabel('x[n]');
7. title('Triangular dt');

Sinc Function:
Continuous time signal:
t=-5:0.001:5;
x=sin(pi*t)./(pi*t);
plot(t,x);
xlabel('t');
ylabel('x(t)');
title('Sinc');

8. Exponential Function:
CT Real Exponential Function :
Alpha>0 Alpha<0 Alpha=0
t=-5:0.001:5; t=-5:0.001:5; t=-5:0.001:5;
x=exp(1*t); x=exp(-1*t); x=exp(0*t);
plot(t,x); plot(t,x); plot(t,x);
xlabel('t'); xlabel('t'); xlabel('t');
ylabel('x(t)'); ylabel('x(t)'); ylabel('x(t)');
title('alpha>0'); title('alpha<0'); title('alpha=0');

You might also like