12 views

Uploaded by neelammeena

Attribution Non-Commercial (BY-NC)

- Simulation in in Mineral Processing
- The Re-Discovery of the Fast Fourier Transform Algorithm
- Invitation Recog2013
- Slab Design by Wood Armer Method
- eled 533 smart goal portfolio final evaluation & reflection
- a-puzzling-outcome-workbook.pdf
- Signals and Systems Question Bank
- Ch18
- CH15
- t3 fs1 weekly newsletter 22nd may 2014
- Formulae
- 2002 June MS
- BS SE Roadmap1617
- Definition of a Limit
- 101009
- Convolution
- Algorithm 61-67
- Quiz 2 Arithmetic Sequence and Means
- Mean Median Mode Filtering
- C27 2007 Orlando IMAC History

You are on page 1of 16

the sequences y[n]=x[4-n]

Program:

n=0:5;

u=[ones(1,6)];

x=fliplr(u);

n=-fliplr(n);

n=n+9;

subplot(2,1,1);

stem(n,x);

xlabel('n');

ylabel('x(n)');

y=fliplr(x);

n=-fliplr(n);

n=n-4;

subplot(2,1,2);

stem(n,y);

xlabel('n');

ylabel('y(n)');

PLOT

Q.2.Write a MATLAB program to test whether the following systems are linear or

non linear.

(a).y[n]=x[n]*cos(pi*n/6)

(b).y[n]=sin(x[n])

(c).5*dy/dt+y(t) = 5*x(t)

Program:

x1 = [1 3 4 6 4];

x2 = [3 2 6 4 1];

a = 0.74; b = 2;

y1_1(1,5)=0;y1_2(1,5)=0;y1_12(1,5)=0;

y2_1(1,5)=0;y2_2(1,5)=0;y2_12(1,5)=0;

y3_1(1,5)=0;y3_2(1,5)=0;y3_12(1,5)=0;

%01

x12 = a*x1 + b * x2;

for i=1:5

y1_1(1,i) = x1(1,i)*cos(pi*i/6);

y1_2(1,i) = x2(1,i)*cos(pi*i/6);

y1_12(1,i) = x12(1,i)*cos(pi*i/6);

y2_1(1,i) = sin(x1(1,i));

y2_2(1,i) = sin(x2(1,i));

y2_12(1,i) = sin(x12(1,i));

y3_1(1,i) = exp(-i/5)*x1(i);

y3_2(1,i) = exp(-i/5)*x2(i);

y3_12(1,i) = exp(-i/5)*x12(i);

end

y1 = a*y1_1 + b * y1_2;

y2 = a*y2_1 + b * y2_2;

y3 = a*y3_1 + b * y3_2;

%01

y11 = y1_12 - y1;

if (abs(y11) > 0.1 )

fprintf ('\nThe system (1) is not linear.\n');

else

fprintf ('\nThe system (1) is linear.\n');

end

%02

y22 = y2_12 - y2;

if (abs(y22) > 0.1 )

fprintf ('\nThe system (2) is not linear.\n');

else

fprintf ('\nThe system (2) is linear.\n');

end

%03

y33 = y3_12 - y3;

if (abs(y33) > 0.1 )

fprintf ('\nThe system (3) is not linear.\n');

else

fprintf ('\nThe system (3) is linear.\n');

end

Output:

For part(a) y[n] is linear

For part(b) y[n] is non linear

For part(c) y[n] is non linear

Q.3.Write a MATLAB program to check whether the system are time variant or

invariant in Q.2.

Program:

x1 = [1 3 4 6 4];

k = 3;

y1(1,8)=0;y1_s(1,8)=0;

y2(1,8)=0;y2_s(1,8)=0;

y3(1,8)=0;y3_s(1,8)=0;

%01

for i=1:5

end

%01

y11 = y1_s - y1;

if (abs(y11) > 0.1 )

fprintf ('\nThe system (1) is not time variant.\n');

else

fprintf ('\nThe system (1) is time variant.\n');

end

%02

y22 = y2_s - y2;

if (abs(y22) > 0.1 )

fprintf ('\nThe system (2) is not time variant.\n');

else

fprintf ('\nThe system (2) is time variant.\n');

end

%03

y33 = y3_s - y3;

if (abs(y33) > 0.1 )

fprintf ('\nThe system (3) is not time variant.\n');

else

fprintf ('\nThe system (3) is time variant.\n');

end

Output:

Part (a) is time variant

Part (b) is time invariant

Part (c) is time invariant

Q.4. Write a Program to implement a non causal three sample average given by

Y[n]=1/3*(x[n+1]+x[n]+x[n-1])

Program:

clear all;

n=-5:10;

x=2*n;

n1=n-1;

n3=n+1;

m=min(min(n1(1),n(1)),n3(1)):max(max(n1(16),n(16)),n3(16));

m;

y1=[zeros(1,length(m))];y2=y1;y3=y2;

l=1:length(n);

k=-1;

for i=m(1):n1(1)

k=k+1;

end

y1(k+l)=x;

k=-1;

for i=m(1):n(1)

k=k+1;

end

y2(k+l)=x;

k=-1;

for i=m(1):n3(1)

k=k+1;

end

y3(k+l)=x;

y1=(y1+y2+y3)/3;

Q.5.Write a program to compute and plot the impulse response of a system given

by

Y[n]=0.8y(n-1) - 0.6y(n-2) + 0.866x(n)

Also determine stability of the system

Program:

a=[1,-0.8,0.64];

b=.866;

n=-25:25

x=[zeros(1,25) 1 zeros(1,25)];

h=filter(b,a,x);

stem(n,h);

xlabel('n');

ylabel('h(n)');

if(sum(abs(h))<realmax)

disp('The system is stable');

else

disp('The system is not stable');

end

Output:

The system is stable

PLOT

Q.6.Write a program to determine output y[n], n>=0 of the system determined by

the system described by the difference equation

Y[n] = x[n] - 2*x[n-1] + x[n-2]

Where input is x[n]=u[n]. Also plot y[n] for 0<=n<=25.

For this system, determine the impulse response. And then verify using the

convolution function.

Program:

clear all;

n=0:1:25;

x=[ones(1,26)];

x1=[zeros(1,1),ones(1,25)]

x2=[zeros(1,2),ones(1,24)];

y=x-(2*x1)+x2;

stem(n,y);

PLOT

1

0.8

0.6

0.4

0.2

-0.2

-0.4

-0.6

-0.8

-1

0 5 10 15 20 25

Q.7.Write a program to determine the convolution of the two sequence given

below

X[n]={3,11,7,0,-1,4,2}

H[n]={2,3,0,-5,2,1}

Program:

x=[3 11 7 0 -1 4 2];

h=[2 3 0 -5 2 1];

y=conv(x,h);

disp('The convolved sequence is');

y

Output:

The convolved sequence is

y=

6 31 47 6 -51 -5 41 18 -22 -3 8 2

Q.8.Write a program to compute and plot the correlation sequences rxy[m] and

rxx[m] for the following signal sequences

X[n]=1, for n = -3<=n<=7

0, Otherwise

y[n]=1, for n = -5<=n<=5

0, Otherwise

Where m is shift parameter

Program:

x=[ones(1,11)];

y=[ones(1,11)];

n1=-3:7;

n2=-5:5;

y1=fliplr(y);

n3=-fliplr(n2);

rxy=conv(x,y1);

nb=n1(1)+n3(1);

ne=n1(11)+n3(11);

n=nb:ne;

subplot(2,1,1);

stem(n,rxy);

xlabel('n');

ylabel('Rxy');

clear y1;

clear n3;

clear n;

y1=fliplr(x);

n3=-fliplr(n1);

rxx=conv(x,y1);

nb=n1(1)+n3(1);

ne=n1(11)+n3(11);

n=nb:ne;

subplot(2,1,2);

stem(n,rxx);

xlabel('n');

ylabel('Rxx');

PLOT

Q.9. A system has the impulse response sequence given as

H(n)=(1/2)n,0<=n<=3

0,Otherwise

Write a Program to compute output of the system, Where input are the following

sequences

(a). x[n] =(-1/2)n*u(n)

(b).x[n]=cos(π*n/16)

(c). A song generated in lab 02 q.6

Program:

n=0:3;

h=(0.5).^n;

n1=0:20;

%For part (a)

x=(-0.5).^n1;

y1=conv(x,h);

clear x;

%For part (b)

x=cos(pi*n/16);

y2=conv(x,h);

clear x;

%For part (c)

t=20;

f=[440 493.88 554.37 587.33 659.26 739.99];

x=sin(2*pi*f*t);

y=conv(x,h);

Q.10.A signal is given by

X[n] = cos(0.025*n)+0.3*cos(0.75*n)

Is filtered using FIR filter represented as

Y[n] = x[n]/6 + x[n-1]/3 + x[n-3]/6 + x[n-2]/3

Determine y[n] and plot x[n] and y[n]

Program:

n=0:20;

x=cos(0.025*n)+0.3*cos(0.75*n);

a=1;

b=[1/6 1/3 1/3 1/6];

y=filter(b,a,x);

subplot(2,1,1);

stem(n,x);

xlabel('n');

ylabel('x(n)');

subplot(2,1,2);

n=0:length(y)-1;

stem(n,y);

xlabel('n');

ylabel('y(n)');

PLOT

- Simulation in in Mineral ProcessingUploaded byshashidharsm
- The Re-Discovery of the Fast Fourier Transform AlgorithmUploaded byFederico Di Mattia
- Invitation Recog2013Uploaded byJudith Jenea Retaga
- Slab Design by Wood Armer MethodUploaded byUmesh Patil
- eled 533 smart goal portfolio final evaluation & reflectionUploaded byapi-241633936
- a-puzzling-outcome-workbook.pdfUploaded bybuzuleacnadya
- Signals and Systems Question BankUploaded byVimal Raj
- Ch18Uploaded byDayanand GK
- CH15Uploaded byEldreds Guillermo Enalisan
- t3 fs1 weekly newsletter 22nd may 2014Uploaded byapi-244417402
- FormulaeUploaded byChenna Kesho
- 2002 June MSUploaded byKaushal
- BS SE Roadmap1617Uploaded byhimanshum88
- Definition of a LimitUploaded byJonnifer Quiros
- 101009Uploaded byIJCNSVol2NO10
- ConvolutionUploaded bykuzeysc
- Algorithm 61-67Uploaded byAnnyeong Chingu
- Quiz 2 Arithmetic Sequence and MeansUploaded byMarjorie Rodriguez
- Mean Median Mode FilteringUploaded bySarthak Sehgal
- C27 2007 Orlando IMAC HistoryUploaded byLeonardo Rodriguez
- 200701 UMaths TMA2 AnsGuideUploaded byapi-26781128
- Mathematics—2005 (Set II—Delhi)Uploaded bynewtonfogg123
- Image ProcessingUploaded byawara
- Spatial FilteringUploaded byFaheem Ahmed
- 036 3.9.The-z-tableUploaded byTECH. Craft
- coordinatesUploaded byapi-350796500
- L11_OptimizationUploaded byJesús Cisneros Jr.
- CR+ paperUploaded byGhassan Fallouh
- F4 Maths MidyearUploaded byStpmTutorialClass
- 2006 - Time and Frequency Domains Iterative - Fergyanto E Gunawan - Key Engineering MaterialsUploaded byupasara_wulung_1980

- Matteo Scalperf 2017Uploaded byceccarellom
- Losses in PSCUploaded bySandeep Reddy
- Temperature and HeatUploaded byb_westheimer
- Road Capacity CalculationsUploaded bymjfprgc
- PREDICTIVE MODELS FOR SYSTEM XC - ANTIPORTER INHIBITION BASED ON STRUCTURALLY DIVERSE MOLECULESUploaded byiajps
- Introduction to Taguchi Methods.pdfUploaded byEdgar Hernández Bonilla
- third grade schedule 2017-2018 1Uploaded byapi-283688819
- Gas Dynamics and Jet PropulsionUploaded byVinoth Rajaguru
- Phast Multi Component Extension 1012 2 Tcm4-529071Uploaded bythawdar
- Mcc CardUploaded byBaldintza
- Tutorial en Ingles de SatmasterUploaded byGladys Quispe Loza
- Shape of a Rotating StarUploaded byTrevor Davis
- MathematicsUploaded bydash1991
- CE2100 Lecture 1Uploaded bySaiRam
- 11 Mathematics Relations and Functions Test 01 Answer 9iuhUploaded byMeenakshi Venkataraman
- Mechanical Principle and Application - Assignment 2--Uploaded byMuruganandam Ramadass
- PID Controller Tuning Optimization With BFO Algorithm in AVR SystemUploaded byEditor IJRITCC
- webchapBUploaded bytanvir09
- JPEGUploaded byRakesh Inani
- Alignment Matrix - 242682 - Demonstrate knowledge and.xlsUploaded byChristian Makande
- data structures module 2Uploaded byAnonymous keT5Du
- huacopula.pdfUploaded byRamesh Konakalla
- Christian MathUploaded bymarian111
- Box Counting MethodUploaded byFatherg
- Example of FDM and FEM Solution of boundary Value Problems.pdfUploaded byBarrouz
- Ms Soc Verification WpUploaded byspweda
- Face Recognition System on Raspberry PiUploaded byAlan Sagar
- Q B JavaUploaded byLalith Kumar
- The Leadership QuarterlyUploaded bySyahrial Sarafuddin
- Math g2 m3 Full ModuleUploaded byRivka Share