Signal and Systems (Matlab Tutorial) - ECE-314 Spring 2006, Assignments of Signals and Systems

Instructions for using the matlab function 'stem' to plot discrete sequences. It includes examples of plotting the sequences 'x(n)' and 'y(n)', as well as defining and plotting a new sequence 'z(n)' based on 'y(n)'. The document also demonstrates how to add two signals 'x1(t)' and 'x2(t)' and plot them on the same figure using matlab.

Typology: Assignments

Pre 2010

Uploaded on 09/17/2009

koofers-user-qt1
koofers-user-qt1 🇺🇸

10 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ECE-314 Spring 2006
Signal and Systems (Matlab Tutorial)
Part1 (Continued…)
C) Find y(n), for n=1,…,30 . y(n) is given by: y(n)=20+y(n-1) ; y(1)=2
Compute their sum
D) help stem
STEM Discrete sequence or "stem" plot.
STEM(Y) plots the data sequence Y as stems from the x axis
terminated with circles for the data value.
STEM(X,Y) plots the data sequence Y at the values specfied
in X.
STEM(...,'filled') produces a stem plot with filled markers.
STEM(...,'LINESPEC') uses the linetype specifed for the stems and
markers. See PLOT for possibilities.
H = STEM(...) returns a vector of line handles.
See also PLOT, BAR, STAIRS.
Using the Matlab function “stem” plot the following graph
pf3
pf4
pf5
pf8

Partial preview of the text

Download Signal and Systems (Matlab Tutorial) - ECE-314 Spring 2006 and more Assignments Signals and Systems in PDF only on Docsity!

ECE-314 Spring 2006 Signal and Systems (Matlab Tutorial) Part1 (Continued…) C) Find y(n), for n=1,…,30. y(n) is given by: y(n)=20+y(n-1) ; y(1)= Compute their sum D) help stem STEM Discrete sequence or "stem" plot. STEM(Y) plots the data sequence Y as stems from the x axis terminated with circles for the data value. STEM(X,Y) plots the data sequence Y at the values specfied in X. STEM(...,'filled') produces a stem plot with filled markers. STEM(...,'LINESPEC') uses the linetype specifed for the stems and markers. See PLOT for possibilities. H = STEM(...) returns a vector of line handles. See also PLOT, BAR, STAIRS. Using the Matlab function “stem” plot the following graph

Part 1 -Using the Matlab function “stem” plot the following graph

3- Now we define z(n)=y(2n) where n=-2,-1,0,1. Plot z(n) 4- On a same figure, plot y(n) and z(n)

_5-Addition of two signals Consider the signals : x1(t)=cos(t) +sin(t) and x2(t)=sin(t)cos(t) Plot x1(t), x2(t) and x3(t)=x1(t)+x2(t) on the same figure use t=[-5:.2:5]_*