Plot function, MATLAB Programming

Assignment Help:

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

 


Related Discussions:- Plot function

Illustration of input function, Illustration of Input function: For il...

Illustration of Input function: For illustration, >> rad = input('Enter the radius: ') Enter the radius: 5 rad = 5 If character or string input is preferred, 's' s

write a matlab program to generate and plot the signal, 1.      Write a MA...

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

Write a matlab program to calculate and store, Problem of a projectile bein...

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

Printing vectors and matrices, Printing Vectors and Matrices: For vect...

Printing Vectors and Matrices: For vector, if the conversion character and newline character are in the format string, it will print in a column in spite of of whether the vec

Plot the poles and zeros of the filter using zplane, A filter described by ...

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

Write a program that computes the cost, The cost of sending a package by an...

The cost of sending a package by an express delivery service is $15 for the first two pounds, and $4.25 for each pound over two pounds. Write a program that computes the cost of

Illustration of built-in functions and help , Illustration of Built-in func...

Illustration of Built-in functions and help: To find out what a specific function does and how to call it, type help and then the name of function. Illustration: >> help si

Mod function, how to reverse the digits of positive number by using mod fun...

how to reverse the digits of positive number by using mod function?

Illustration of modifying elements, Illustration of Modifying Elements: ...

Illustration of Modifying Elements: Illustration, the fifth element in the vector newvec is 9 >> newvec(5) ans = 9 The subset of a vector, that would be a vector it

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd