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
Problem of a projectile being launched at an angle of O at an initial velocity ofv. The equations for the height hand horizontallocation x as functions of time t are as follo

The diagram shown on the next page represents a planar pantograph-based leg for a walking robot. This model utilizes only one DOF to generate the walking gait at the foot link 'n

Goal: Learn how to do statistics, sorting and curve fitting in Matlab. Put all of those ".m" files in a folder called yourname_lab7, and zip the folder and submit it on the class w



Example of Variables and assignment statements: The expression is computed and then that value is stored in the variable. For illustration, this is the way it would appear in

Illustration of modifying the matrix elements: If a single index is used with the matrix, the MATLAB unwinds the matrix column by column. For illustration, for the matrix intm

Q.1: Consider the transmission of a sinusoid x(t) = cos(2f0t) through a channel a ected by multipath and Doppler. Let there be two paths, and assume the sinusoid is being sent fro

Make a vector of 500 random numbers from a normal distribution with mean 2 and standard deviation 5(randn). a After you generate the vector, verify that the sample mean and stan

This project carries 50% of your ?nal mark. Please hand in your work to the Mathematical and Physical Sciences School O?ce, no later than 4pm Monday 21st January 2013. Please ?l