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
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
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