15 views

Uploaded by UsmanAli

qwer

qwer

© All Rights Reserved

- MATHS MODEL TEST PAPER FOR SUMMATIVE ASSESSMENT– 1
- Circuits Laboratory Companion
- Rsl Cbta Plan Etn 103
- XVII – Trigonometric Functions of Real Numbers
- AC Electric Circuits_10_Phasor Mathematics
- ALevel_Short Note
- sinusoids318_4up
- Experement7-fourier-transform.pdf
- tmp27B1
- Sin and Cos functions
- Chapter 12-Trigonometry 1 MDIS
- M1901A - S-band 500kW Magnetron (Para Radar Meteorogico)
- ch8a
- Functions Week2
- 4 - 5 - Lecture 20 BONUS
- lesson plan complex numbers
- Calculus Review Formulas
- 8MA0-01 as Pure Mathematics May 2018 Mark Scheme (Final)
- 05(2)
- PWM_1

You are on page 1of 7

TYPES OF SEQUENCES

1. Unit sample sequence:

{

(nn 0)= 1,n=n 0

0,n n 0

Question 1:

Write a MATLAB function to implement unit sample sequence (n) over theinterval

n1 n0 n2

Write your own matlab function having 3 input arguments n0, n1, n2. This function

should return two vectors x, n. Do not use zeros command.

Question 1 part 2:

. Generate and plot the following sequence over the indicated interval

x(n) = 2(n + 2) (n 4), 5 n 5.

{

u(nno)= 1,n n 0

0,n< n 0

Question 2:

. Write a MATLAB function to implement unit step sequence u(n) over theinterval

n1 n0 n2

and having 3 input arguments n0, n1, n2. This function should return two vectors x, n. Do

not use zeros and ones command.

Question 3:

Define x1=5exp(i*n*pi/4) in MATLAB and plot using n = -50:50.

Define another signal x2= an.

Multiply these two(x1 and x2) signals (use point-by-point multiplication

of the two signals). Plot the real as well as the imaginary parts

for0<a<1 and a>1.

Question 3 part 2:

Generate the complex-valued signal

x(n) = e(0.1+j0.3)n, 10 n 10

and plot its magnitude, phase, the real part, and the imaginary part in

four separate subplots.

DSP Lab # 2 07-02-2017

4. Periodic sequence:

Question 4:

. Generate and plot the following sequence over the indicated interval

x(n) = {..., 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, 5, 4, 3, 2, 1, ...}; 10 n 9.

Question 5:

Generate two 3000 hertz sinusoids with different amplitudes and phases.

x1(t) = A1 cos(2(3000)t + ) x2(t) = A2 cos(2(3000)t + )

(a) Select the value of the amplitudes as follows: let A1 = 13 and use your

age for A2. For the phases, use the last two digits of your telephone

number for (in degrees), and take = -30. computations

(b) Make a plot of both signals over a range of t that will exhibit

approximately 3 cycles. Make sure the plot starts at a negative time so

that it will include t = 0, and make sure that you have at least 20

samples per period of the wave.

(c) Verify that the phase of the two signals x1(t) and x2(t) is correct at t =

0, and also verify that each one has the correct maximum amplitude.

that puts both of these plots on the same window.

(e) Create a third sinusoid as the sum: x3(t) = x1(t) + x2(t). In Matlab this

amounts to summing the vectors that hold the samples of each

sinusoid. Make a plot of x3(t) over the same range of time as used in

the previous two plots. Include this as the third panel in the window by

using subplot (3,1,3).

(f) Measure the magnitude and phase of x3(t) directly from the plot.

Explain how the magnitude and phase were measured by making

annotations on each of the plots.

Sinusoidal sequences are implemented using sin() & cos().

Example: a continuous-time sinusoid

f0 = 3;

A = 5;

DSP Lab # 2 07-02-2017

t = -1:0.005:1;

y = A*cos(2*pi*f0*t);

figure, plot(t, y,'*:');

xlabel('Time, sec'), ylabel('Amplitude');

title('Graph of sinusoid');

M=10; %samples/sec

n=-3:1/M:3;

A=2;

phase=0;

f=1;

x=A * sin(2*pi*f*n + phase);

stem(n,x,'linewidth', 2)

title('Discrete-Time Sine Wave: A sin(2*\pi*f*n + \phi)')

xlabel('Time Index')

ylabel('Signal Amplitude')

axis([n(1) n(end) -A A])

grid

DSP Lab # 2 07-02-2017

A continuous time signal can be sampled using a command:

stem(x,y);

Following example shows the sampled version of the continuous time cosine

signal.

Example:

t = 0:0.0005:1;

f = 13;

xa = cos(2*pi*f*t);

subplot(2,1,1)

plot(t,xa);grid

xlabel('Time, msec');

ylabel('Amplitude');

title('Continuous-time signal x_{a}(t)');

axis([0 1 -1.2 1.2])

subplot(2,1,2);

T = 0.1;

n = 0:T:1;

xs = cos(2*pi*f*n);

k = 0:length(n)-1;

stem(k,xs); grid

xlabel('Time index n');

ylabel('Amplitude');

title('Discrete-time signal x[n]');

axis([0 (length(n)-1) -1.2 1.2])

DSP Lab # 2 07-02-2017

ADDITION OF SINUSOIDS

CASE 1: When Frequency, Phases, and amplitude of the sinusoids

are same

t=-2:0.01:2;

x1=cos(2*pi*0.5*t);

x2=cos(2*pi*0.5*t);

x3=x1+x2;

subplot(3,1,1);

plot(t,x1,'linewidth',3);

grid;

ylabel('Amplitude');

xlabel('Time');

title('COS WAVE , AMPLITUDE = 1, FREQ = 0.5 HZ, Phase = 0

RADIAN');

subplot(3,1,2);

plot(t,x2,'linewidth',3);

grid;

ylabel('Amplitude');

xlabel('Time');

title('COS WAVE , AMPLITUDE = 1, FREQ = 0.5 HZ, Phase= 0 RADIAN');

subplot(3,1,3);

plot(t,x3,'linewidth',3);

grid;

ylabel('Amplitude');

xlabel('Time');

title('SUM OF THE ABOVE TWO COSINE SIGNALS');

DSP Lab # 2 07-02-2017

CASE 2: When Frequencies and Phases of the sinusoids are same but

Amplitudes are different.

t=-2:0.01:2;

x1=2*cos(2*pi*0.5*t);

x2=cos(2*pi*0.5*t);

x3=x1+x2;

subplot(3,1,1);

plot(t,x1,'linewidth',3);

grid;

ylabel('Amplitude');

xlabel('Time');

title('COS WAVE , AMPLITUDE = 2, FREQ = 0.5 HZ, Phase = 0

RADIAN');

subplot(3,1,2);

plot(t,x2,'linewidth',3);

grid;

ylabel('Amplitude');

xlabel('Time');

title('COS WAVE , AMPLITUDE = 1, FREQ = 0.5 HZ, Phase= 0

RADIAN');

subplot(3,1,3);

plot(t,x3,'linewidth',3);

grid;

ylabel('Amplitude');

xlabel('Time');

title('SUM OF THE ABOVE TWO COSINE SIGNALS');

DSP Lab # 2 07-02-2017

- MATHS MODEL TEST PAPER FOR SUMMATIVE ASSESSMENT– 1Uploaded byApex Institute
- Circuits Laboratory CompanionUploaded byleomclay
- Rsl Cbta Plan Etn 103Uploaded byHa Lim Hasan
- XVII – Trigonometric Functions of Real NumbersUploaded byCamila Guayacán A
- AC Electric Circuits_10_Phasor MathematicsUploaded byMahmoud Basho
- ALevel_Short NoteUploaded bybj
- sinusoids318_4upUploaded byZulfani Aziz
- Experement7-fourier-transform.pdfUploaded byMohammad Kalam
- tmp27B1Uploaded byFrontiers
- Sin and Cos functionsUploaded byracer_10
- Chapter 12-Trigonometry 1 MDISUploaded byterrygoh6972
- M1901A - S-band 500kW Magnetron (Para Radar Meteorogico)Uploaded byAndré
- ch8aUploaded bydavid.contatos4308
- Functions Week2Uploaded byVikashKumar
- 4 - 5 - Lecture 20 BONUSUploaded byRahulsinghoooo
- lesson plan complex numbersUploaded byapi-215853893
- Calculus Review FormulasUploaded byZetta Datta
- 8MA0-01 as Pure Mathematics May 2018 Mark Scheme (Final)Uploaded byZorain Sultan
- 05(2)Uploaded byCadene Reid
- PWM_1Uploaded byEfra Ibaceta
- Lecture_1_9.PDFUploaded byMukhtiar Hussain
- Elaine Vejar ResearchMod OscilloscopeWaveformGenWaveMeasurementsUploaded byJumantoSardion
- 0001qUploaded byabel
- FourierUploaded byArtist Recording
- Prob14-4Uploaded byFengxing Zhu
- MMC 2009 4A RegUploaded byAna Cristina Ilao Sanchez
- 2013, OSA FSOUploaded by900penny
- YaleUploaded byGiridharan Rajanbabu
- maple 8Uploaded byyizzy
- QB Version 2 Circular Functions and Trig MSUploaded byRowanberry11

- system bootstrap kk...Uploaded byRay Miranda
- Project # 01Uploaded byUsmanAli
- Biology 10th.docxUploaded byUsmanAli
- Biology 10th Ch 13Uploaded byUsmanAli
- Biology 10th Ch 14Uploaded byUsmanAli
- New Doc 2018-04-13Uploaded byUsmanAli
- Critical ThinkingUploaded byUsmanAli
- AssignmentUploaded byUsmanAli
- Assignment,,,Uploaded byUsmanAli
- ReportUploaded byUsmanAli
- Lab10Uploaded byUsmanAli
- Problem 1 Part 1Uploaded byUsmanAli
- New Text DocumwentUploaded byUsmanAli
- 123.txtUploaded byUsmanAli
- Labb2Uploaded byUsmanAli
- aaUploaded byUsmanAli
- Ecd ReportUploaded byUsmanAli
- Role of Military in the Politics of PakistanUploaded byUsmanAli
- 3-jinnahUploaded byUsmanAli
- _Problem Set - 1Uploaded byUsmanAli
- wertewrrtUploaded byUsmanAli
- Assignment2.pdfUploaded byUsmanAli
- Dany Pr DanaUploaded byUsmanAli
- China Pakistan Economic CorridorUploaded byUsmanAli
- TemporaryUploaded byUsmanAli
- Weekly ScheduleUploaded byUsmanAli
- 14-EE-26 (M.Usman Ali) TW report.docxUploaded byUsmanAli
- Result 2ndsemester EE E14 Sp15Uploaded bymueed6074
- Fire Alarm Using ThermistorUploaded byUsmanAli

- Abaqus.cae Users ManualUploaded bySarhan Karray
- Septage TechUploaded bySumayyah Tsabitah
- Uponor CAD Details_Heating and CoolingUploaded byadigeto
- Unit 3Uploaded bySriram J
- Diarrhoeal DiseaseUploaded byFayasulhusain Muthalib
- Paper 2 SPM.docxUploaded bySylark
- Hand Reading Technics.pdfUploaded bysekhar raj
- DCT Bibilographic ReviewUploaded byTim Siva
- Direct Displacement Based Seismic DesignUploaded byLim Chern Kuang
- R-20 Indoor GSM900 DCS1800 UMTS Shyam BoosterUploaded byrajeshtripathi2004
- Biology Project XiiUploaded byUma Mouna
- BTEC LEVEL 3 ICT Original.docxUploaded byWalkerslsrp
- Energy Production in Stars - HansBethe1939.pdfUploaded byJu Weiss
- 2sc5902 de panasonic .pdfUploaded byRandall Chinchilla
- note on Photo-electric effect.docxUploaded byBilal Ahmed Barbhuiya
- Computer Aided Analysis of the Structural Behaviour of Sloped Open Lattice Towers 1Uploaded byOladunni Afolabi
- Acer Computers Aspire Aod250 Acer Aspire Aod250 Service Guide 11ccbe5Uploaded bySergio Edgar Scalfaro Ponce
- 5223_L41Uploaded bymeraat
- light-emitting diode - wikipedia, the free encyclopediaUploaded byManit
- hos852.pdfUploaded byCaio Vinicius
- Causative Cosntructions in ZarmaUploaded byAmir
- Wet MillingUploaded byKiran Shetty
- Rain Alarm ProjectUploaded bySahil Naik
- Johann Wolfgang DöbereinerUploaded by怡霖
- Advancements in Perovskite Solar CellsUploaded byVigneshwaran Murugan
- Ultrasonic Horn - Wikipedia, The Free EncyclopediaUploaded bymuna222
- Underwater Concrete - Mix Design and Construction Practices(1).DocUploaded byprasad
- Curved MirrorsUploaded byAira Villarin
- Catalogo general de cargadora sobre ruedasUploaded byElvis Eberth Huanca Machaca
- icspUploaded byJOYCE