You are on page 1of 6

SIGNAL PROCESSING LABORATORY

ICPC-325
TOPIC- Week 2, Fundamentals-I
SUBMITTED BY:
RAHUL
19110074
B.TECH, ICE-5TH SEMESTER
G4

Q1.

Sol-1:

clc

% Quadratic equation.
% Form is ax^2+bx+c=0.
a=input('Coefficient of x^2, a=');
b=input('Coefficient of x, b='); % coefficients
c=input('Coefficient of constant, c=');

y=0:pi/20:pi;
x=sin(y);
q=(a.*x.^2+b.*x+c);
plot(y,q,'r');
grid on
Q2.

Sol-2:
a)

clc

x=1:0.02:3;
y=sin((x.*cos(x))./(x.^2+3.*x+1));
plot(x,y,'r')
grid on
b)

clc

x=-10:0.1:10;
y=x.*abs(x);
plot(x,y);
grid on

Q3.
i)
clc

n=(-10:1:10);
delta=(n==3);
stem (n,delta,'filled')
grid on

ii)

clc

n=(-10:1:10);
u_seq=(n>=3);
stem(n,u_seq,'filled');
grid on
iii)

clc

n=-10:10;
x=(n-3).*((n-3)>=0);
stem(n,x,'filled');
grid on

iv)

clc

x = linspace(-10,10);
y = sinc(x/4);
plot(x,y)
grid on
v)

clc

n=-10:10;
u_s=(n>=0);
x=4*(0.8).^n.*cos(0.2*n*pi).*u_s;
stem(n,x,'filled','r')

****************

You might also like