Plot function, MATLAB Programming

The Plot Function:

We will begin with a very simple graph of one point using the plot function. The script, plotonepoint, below plots only one point. To do this, at first the values are given for the x and y coordinates of the point in individual variables. The point is then plotted using a red*. The plot is then customized by identifying the minimum and maximum values on first the x-axis and then y-axis. The Labels are then place on x-axis, y-axis, and the graph itself by using the function xlabel, ylabel, and the title. All this can be completed from the Command Window, but it is much simpler to use a script. The below shows the contents of the script plotonepoint which accomplishes this. The x-coordinate shows the time of day (example 11am) and the y coordinate shows the temperature in degrees Fahrenheit at that time:

1917_Plot Function.png

 

 

In the call to the axis function, one of the vectors is passed. The first two values are the minimum & maximum for x-axis, and the last two are the minimum & maximum for the y-axis. Executing this script carry a Figure that is window with the plot.

2086_Plot Function1.png

 

Posted Date: 10/18/2012 6:50:51 AM | Location : United States







Related Discussions:- Plot function, Assignment Help, Ask Question on Plot function, Get Answer, Expert's Help, Plot function Discussions

Write discussion on Plot function
Your posts are moderated
Related Questions
A filter described by the equation:    y(n) = x(n) + x(n-1) + 0.9 y(n-1) - 0.81 y(n-2) (a) Find the transfer function H(z) for the filter and find the poles and zeros of the fil

MRI (magnetic resonance imaging) scanners allow doctors to now obtain complete body images for medical diagnosis purposes. The system produces scans which represent slices through

The Switch Statement: A switch statement can frequently used in place of a nested if-else or an if statement with numerous else if clauses. The Switch statements are used when

Finite Difference Method for An Elliptic Partial Differential Equation   Problem  Use the finite difference method and MatLab code to solve the 2D steady-state heat equat

how to implement 3 out of 4 visual cryptography in MATLAB?

In this lab, we study the three concepts. Vector is used to store more than one value into single variable. It is similar to array (other programming language). Script is a collect

Code and decode a 32 bit long data for a specific user in CDMA if there is only 1 user and no noise.

Design and implement Binary digital modulation for a specific input signal frequency, sampling frequency and signal level for binary frequency shift keying (BFSK) by applying MATLA

The purpose of this lab is to enhance the ECE311 student's understanding of filter behavior and filter design and to provide the student the opportunity to demonstrate skills in li

1.      Write a MATLAB program to generate and plot the signal                                     x1(n) = [3 2 -2 0 7],  n = 0,1,2,3,4. 2.      Write a MATLAB program to gen