MATLAB program for Ramp Waveform generation

Program code
n=1:5;
stem (n,2*n);
xlabel ('N');
ylabel ('Amplitude');
title ('Ramp Waveform');
grid on; 



Output

Explanation of Program Code
clc;
It clears all input and output from the Command Window display giving clean screen. It removes items from workspace, freeing up system memory. After using clc, the scroll bar cannot be used to see the history of functions, but still the up arrow can be used to recall statements from the command history.

clear all;
It removes all variables from the workspace. This frees up system memory.

close all;
It deletes all figures whose handles are not hidden.

n=1:5;
Here the following vector n is created.
n=[1     2     3     4     5]
Here this vector n is used as time axis(x axis) while plotting ramp waveform.

stem (n,2*n);
It is used to create ramp waveform.

xlabel ('N');
It labels x axis(time axis) as N. Each axes graphics object can have one label for the x-, y-, and z-axis. The label appears beneath its respective axis in a two-dimensional plot.

ylabel ('Amplitude');
It labels y axis as amplitude.

title ('Ramp Waveform');
It outputs the phrase 'Ramp Waveform' above the figure at the top.

grid on;
It adds major grid lines to the current axes.
__________________

No comments:

Post a Comment

Please write your opinion about this MATLAB program here, only in English.

For sale

For sale
Indian currency Ten-rupee note in good condition. Issued by the Reserve Bank of India between 22 December 1992 and 21 December 1997. Serial number 52T332603 . Those interested to buy, please contact: Anju K, Email: tc9749@gmail.com . Address: 'Sreyas', House no.7/296, Pulliodi, Kathiroor village, Ponniam east PO, via Ponniam west, Thalassery, Kannur, Kerala - 670641, India.