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

Programming concept, The Programming Concept: In most of the programmi...

The Programming Concept: In most of the programming languages, random function returns a real number; therefore the real number would then have to be rounded to produce a rand

Functions which return more than one value, Functions which return More tha...

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

Salary calculation, write a matlab program to calculate employee salary.

write a matlab program to calculate employee salary.

Calculates the inverse of matrix by gauss-jordan elimination, Write a funct...

Write a function that solves a system of linear equations or calculates the inverse of a matrix by Gauss-Jordan elimination. Your function should accept a matrix as an argument and

Built-in functions and help, Built-In Functions and help: There are lo...

Built-In Functions and help: There are lots of built-in functions in a MATLAB. The help command is used to find out what functions MATLAB has, and how to use them. For illustr

Analytical solution and numerical solution, using 0de 45 how can i get the ...

using 0de 45 how can i get the anlytical and numerical solutions for an equation,,

Calculate displacement using indefinite integrals, Problem: A function ...

Problem: A function is given by Y= 2x3 + 3 x2 -12x + 5 a determine the finite values of x at which any local maximum of minimum occur and determine the corresponding val

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