PLOTTING UNITE STEP AND RAMP FUNCTION IN MATLAB

Sogive 8,664 views 23 slides Dec 18, 2017
Slide 1
Slide 1 of 23
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23

About This Presentation

PLOTTING UNITE STEP AND RAMP FUNCTION IN MATLAB


Slide Content

PLOTTING UNITE STEP AND RAMP FUNCTION IN MATLAB Wellcome to our presentation . Slide 1

Group Members MAHMUDUL HASAN Slide 2

Introduction. Mathology. Plotting function on Matlab Define Mathmatically and Graphically Conclusion Reference Apendix Slide 3 OVERVIEW

Idea of the project Consider a signal is given.you have to do the following: 1.the signal is a combination of 10 step function. 2.The Step functions are defined. 3.Represent the function graphically. 4.Find the complete Ramp function. 5.express mathematically and illustrate graphically. Slide 4

Project description We add ten step function randomly in a function.then we find step function by mathmatically and graphically.we draw in this signal.then we again draw this signal by using matlab.after that we find ramp fuction from this equation by mathematically and graphically. then we plot it in mat lab. Slide 5

Perpose of the project Know about unite step function. Know about ramp function. How to plot unite step function in graph. How to plot ramp function in graph. Matab programme. Slide 6

The Unit Step Function Definition: The unit step function, u ( t ) , is defined as That is, u is a function of time t , and u has value zero when time is negative (before we flip the switch); and value one when time is positive (from when we flip the switch). Slide 7

The Unit Ramp Function The ramp function is a unary real function, easily computable as the mean of the independent variable and its absolute value. This function is applied in engineering (e.g., in the theory of DSP). The name ramp function is derived from the appearance of its graph. Slide 8

Draw unite step function Draw unite step function graphically and mathmaticaly Slide 9

-2 -4 t -3 -1 1 2 3 4 5 1 2 3 4 5 6 7 8 9 10 X(t) X(t)=u(t+4)+u(t+3)+u(t+2)+u(t+1)+u(t)+u(t-1)+u(t-2)+u(t-3)+u(t-4)+u(t-5) +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 Slide 10

Before 4 second, the value of the pulse is 1. Then the amplitude of the pulse is 1 and stays at that value 1 seconds. The pulse then turns to 3 at time  t  = 3 seconds. We wind up with the rectangular pulse  x (t)  described as the sum of two step functions: x (t) = u(t + 4) +3u(t +3) -2 -4 t -3 -1 1 2 3 4 5 1 2 3 4 5 6 7 8 9 10 Slide 11

Unit Step Graph matlab This code is shown in apendix A Slide 12

Comparison between math and code Slide 13

The Unit Ramp Function The unit ramp function is the integral of the unit step function. It is called the unit ramp function because for positive t, its slope is one amplitude unit per time. Slide 14

Draw unite ramp function Draw ramp function graphically and mathmaticaly Slide 15

t r(t) 1 2 3 4 5 6 7 8 9 10 X(t)=r(t+4)+r(t+3)+r(t+2)+r(t+1)+r(t)+r(t-1)+r(t-2)+r(t-3)+r(t-4)+r(t-5) +0 +0 +0 +0 +0 +1 +2 +3 +4 +5 Slide 16

Unit Ramp Function This code is shown in apendix B Slide 17

Observation between two Graph Slide 18

Observation: The derivative of the ramp function Step function The integration of the step function Ramp function Slide 19

Inquiry [email protected] Slide 20

Referrance https://www.google.com/search?q=unit+step+function+definition&client=firefox-b&source=lnms&sa=X&ved=0ahUKEwikteH40JnTAhVMtI8KHU7JB_IQ_AUIBSgA&biw=1366&bih=659&dpr=1 https://www.youtube.com/watch?v=YMveWtrCOds https://en.wikipedia.org/wiki/Ramp_function Slide 21

Apendix Matlab code for unite step function clear all clc t=-20:0.001:20; y=heaviside(t+4)+heaviside(t+3)+heaviside(t+2)+heaviside(t+1)+heaviside(t)+heaviside(t-1)+heaviside(t-2)+heaviside(t-3) +heaviside(t-4)+heaviside(t-5); plot(t,y); axis([-10 10 -10 10]) Slide 22

Apendix Matlab code for unite Ramp function close all; clear all; clc n1=input('Enter lower limit'); n2=input('Enter upper limit'); n=n1:n2; x=n.*[n>=0]; subplot(2,1,1); plot(n,x,'r'); title('Continuous'); subplot(2,1,2); stem(n,x,'b'); title('Discrete'); Slide 23