function[y,n]=sigadd(x1,n1,x2,n2)

Slides:



Advertisements
Similar presentations
Chapter 14 Finite Impulse Response (FIR) Filters
Advertisements

3 hr 5 hr 8 hr Hours worked Charge
Two Special Right Triangles
1.1 Line Segments, Distance and Midpoint
Group - E Group Members Burdukov, Ilya Igorevich Lewczyk, Tomasz Sithambaram, Sasitharan Penmatcha, Bharath Steszewski, Andrew Joseph MAE412.
1.4 Linear Equations in Two Variables
Graphics in Turing. (0,0) (maxx,maxy) Variables that do not have to be declared that give you the maximum value for your x and y co-ordinates. (maxx,0)
Solving polynomial Equations in Factored Form MM1A2f: Goal: solve polynomial equations Factor trinomials of the form x2 +bx +c.
3.6 PARALLEL LINES IN THE COORDINATE PLANE 1 m = GOAL
5.3 Inverse Function.
O A Corpo 1 Cinemática e Cinética de Partículas no Plano e no Espaço Análise Dinâmica dos Corpos O X Y X1X1 Y1Y1 X2X2 Y2Y2 X3X3 Y3Y3 A B P l = 75 mm l.
Applets and Graphics.
Introduction To MATLAB Prof. Muhammad Saeed Mathematical Modeling and Simulation.
Thursday, March 7 Duality 2 – The dual problem, in general – illustrating duality with 2-person 0-sum game theory Handouts: Lecture Notes.
Created by Mr.Lafferty Maths Dept
Graphs & Linear Equations
The Derivative in Graphing and Application
One-to-One Functions; Inverse Function
Slope of a Line 11-2 Warm Up Problem of the Day Lesson Presentation
Calculating Slope m = y2 – y1 x2 – x1.
Slope Problems.
Program Verification Using Hoares Logic Book: Chapter 7.
Linear Equations in Two Variables
Chapter 10 NOTES PRACTICE PROBLEMS.
Algorithms and applications
Pattern Finding and Pattern Discovery in Time Series
Another example Max z=5x1+12x2+4x3-MR S.t. x1+2x2+x3+x4=10
Area of triangles.
Numbers & Geometry Points and Distances. 6/3/2013 Numbers and Geometry 2 Distance d between numbers a and b d = Example: | = Points and Distances.
KRISHNA MURTHY IIT ACADEMY.
ML Lists.1 Standard ML Lists. ML Lists.2 Lists  A list is a finite sequence of elements. [3,5,9] ["a", "list" ] []  Elements may appear more than once.
Equations of Lines Equations of Lines
1 K  Convexity and The Optimality of the (s, S) Policy.
Constant, Linear and Non-Linear Constant, Linear and Non-Linear
Functions, Graphs, and Limits
Graphing Lines Day 0ne. Cover the concepts: Relation Function
Summer ’12 AP Computer Science APCS Summer Assignments Read thoroughly this ppt and solve examples 6 and 7.
On / By / With The building blocks of the Mplus language.
Gradient of a straight line x y 88 66 44 2 44 4 For the graph of y = 2x  4 rise run  = 8  4 = 2 8 rise = 8 4 run = 4 Gradient = y.
1, 3, 5, 7, 9, … + 2 TermNumbersPattern of Numbers The n-order for the pattern of odd numbers is 2n – 1, for n is natural numbers n ?
Lab # 03- SS Basic Graphic Commands. Lab Objectives: To understand M-files principle. To plot multiple plots on a single graph. To use different parameters.
There are two basic categories: There are two basic categories: 1. Feed-forward Neural Networks These are the nets in which the signals.
A.F 3.1- Graph Functions A.F 3.3- Slope
1 Multisensor Data Fusion 1. The Filtering Approach: F 1 (s) F 2 (s) F k (s) x n1n1 n2n2 nknk z y1y1 y2y2 ykyk (1) (2) (3) 2. The Compensation Approach:
COORDINATE PLANE.
Slope and y-intercept Lesson 8-3 p.397.
Preview Warm Up California Standards Lesson Presentation.
By Matty Lu and Mc-Welch
Reflections and Symmetry Lesson 5.2. Flipping the Graph of a Function Given the function below  We wish to manipulate it by reflecting it across one.
2 x0 0 12/13/2014 Know Your Facts!. 2 x1 2 12/13/2014 Know Your Facts!
2 x /18/2014 Know Your Facts!. 11 x /18/2014 Know Your Facts!
Quit 2 Dimensional graphs 3 Dimensional graphs Functions and graphs Graphing functions.
Practice Skip Counting
2 x /10/2015 Know Your Facts!. 8 x /10/2015 Know Your Facts!
X-box Factoring. X- Box 3-9 Product Sum Factor the x-box way Example: Factor 3x 2 -13x (3)(-10)= x 2x 3x 2 x-5 3x +2.
Straight Line Equation.
Chapter 30 Induction and Inductance In this chapter we will study the following topics: -Faraday’s law of induction -Lenz’s rule -Electric field induced.
Solving Rational Equations Solving Rational Equations
A lesson on interpreting slope and y-intercept in real world examples
All Rights Reserved © Alcatel-Lucent 2006, ##### 1 | Presentation Title | Month 2006 Router A Router B OSPF Hdr: Session ID = X1; Nonce = N1 OSPF HELLO:
ALGORITHMS AND FLOWCHARTS
Multiplication Facts Practice
Graeme Henchel Multiples Graeme Henchel
CSE202: Lecture 3The Ohio State University1 Assignment.
(1) MAX X1+3X2+2X3+4X4 X1=AM PHONE, X2=AM RIDE, X3=AFT PHONE, X4=AFT RIDE CONSTRAINTS AM: X1+20X2 < 12(60)=720 AFT: 2X3+30X4 < 14(60) = 840 GAS: X2+X4.
0 x x2 0 0 x1 0 0 x3 0 1 x7 7 2 x0 0 9 x0 0.
Chapter 2 Discrete-time signals and systems
7.2 Graphing Polynomial Functions
1.5: Velocity-time graphs
Fast Fourier Transform
Presentation transcript:

function[y,n]=sigadd(x1,n1,x2,n2) %n1:index vector for x1 %n2:index vector for x2 n=min(min(n1),min(n2)):max(max(n1),max(n2));%duration of y(n) y1=zeros(1,length(n)); y2=y1; %initialization y1(find((n>=min(n1))&(n<=max(n1))))=x1; %x1 with duration of y y2(find((n>=min(n2))&(n<=max(n2))))=x2; %x2 with duration of y y=y1+y2;

>> x1=[1 1 1]; >> n1=[2 3 4]; >> x2=[2 2 2]; >> n2=[4 5 6]; >> [y,n]=sigadd(x1,n1,x2,n2) y = 1 1 3 2 2 n = 2 3 4 5 6

function[y,n]=sigmult(x1,n1,x2,n2) %n1:index vector for x1 %n2:index vector for x2 n=min(min(n1),min(n2)):max(max(n1),max(n2));%duration of y(n) y1=zeros(1,length(n)); y2=y1; %initialization y1(find((n>=min(n1))&(n<=max(n1))))=x1; %x1 with duration of y y2(find((n>=min(n2))&(n<=max(n2))))=x2; %x2 with duration of y y=y1.*y2;

>> [y,n]=sigmult(x1,n1,x2,n2) 0 0 2 0 0 n = 2 3 4 5 6

function [y,n]=sigshift(x,m,k) %implements y(n)=x(n-k) %m: index vector for x n=m+k;y=x; >> xn=0:20;x=stepseq(0,0,20); >> [y,yn]=sigshift(x,xn,5); >> subplot(2,1,1),stem(xn,x),title('u(n)'),axis([0 30,0,1]) >> subplot(2,1,2),stem(yn,y),title('u(n-5)'),axis([0 30,0,1])

function [y,n]=sigfold(x,n) %implements y(n)=x(-n) y=fliplr(x); n=-fliplr(n); >> xn=0:6;x=rampseq(0,0,6); >> [y,yn]=sigfold(x,xn); >> subplot(2,1,1),stem(xn,x),title('ur(n)'),axis([-10,10 ,0,6]) >> subplot(2,1,2),stem(yn,y),title('ur(-n)'),axis([-10,10 ,0,6])

>> n=-2:10;x=[1:7, 6:-1:1]; >> [x11,n11]=sigfold(x,n);[x11,n11]=sigshift(x11,n11,3); >>[x12,n12]=sigshift(x,n,2);[x12,n12]=sigmult(x,n,x12,n12); >> [x1,n1]=sigadd(x11,n11,x12,n12); >> stem(n1,x1)

N=7 >> x=[2 1.5 1 0.5 0 0 0]; >> n=-6:14; >> stem(n,[x x x])

function [xe,xo,l]=evenodd(x,n) %Real signal decomposition into even and odd parts if any(imag(x)~=0) error('x is not a real signal') end [y,m]=sigfold(x,n); [xe,l]=sigadd(x,n,y,m);xe=xe/2; [xo]=sigadd(x,n,-y,m);xo=xo/2;

>> n=[0:10];x=stepseq(0,0,10)-stepseq(10,0,10); >> [xe,xo,m]=evenodd(x,n); >> subplot(2,2,1); stem(n,x);title('X(n)'); axis([-10,10,0,1.2]) >> subplot(2,2,2); stem(m,xe);title('Xe(n)'); axis([-10,10,0,1.2]) >> subplot(2,2,4); stem(m,xo);title('Xo(n)'); axis([-10,10,-0.6,0.6])

>> nx=-3:3;X=[1:7];[Y,ny]=sigfold(X,nx); >> [Y1,ny1]=sigshift(Y,ny,1); >> [X1,nx1]=sigshift(X,nx,1);[Y2,ny2]=sigfold(X1,nx1); >> subplot(2,1,1); stem(ny1,Y1); title('y(n-1)');axis([-4,4,0,8]) >> subplot(2,1,2); stem(ny2,Y2); title('y(n,1)');axis([-4,4,0,8]) y(n)=x(-n) is TIME VARIANT