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
Plot way forms for the following modulation schemes using Mathlab: a)      2 ASK                     b)  BFSK                        c) BPSK 4 ASK

The occurrence of bushfires in the Port Stephens area may be modelled by a Poisson process. The average occurrences of bushfires n is assumed to be either 15 (event A 1 ), 20 (even

Example of Printing vectors: For vectors & matrices, even though formatting cannot be specified, the disp function may be simpler to use in common than fprintf as it displays

Write a Matlab function that computes y1= tan(x) and y2= sin(x)/cos(x), returns the difference |y1-y2| and prints a message whether the two are equal or not. Test your function for

Functions which return More than one Value: Functions which return one value have one output argument. The Functions which return more than one value should rather have more t


This assignment deals with the combination of dynamic memory allocation and structures to create a common data structure known as a doubly-linked list, which is shown in Figure 1.

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

how to write a program to determine the day of the week. using GUI.

Ask question #Mingdfgdfgdfgimum 100 words accepted#