How To Plot A Line On Matlab


MATLAB will output the comments leading up to the function definition or the first block of comments inside a function definition when you type: >> help functionname. How to plot a line of a certian color. We're going to use paremetric equations to describe a circumference in 5 easy steps. TO PLOT A LINE GRAPH OF MONTH ON X-AXIS AGAINST AND A,B,C, AND D ON Y-AXIS 2 Comments. SYNTAX: n=hist(y) – Bins the elements in vector y into 10 equally spaced containers and returns the number of elements in each container as a row vector. How do you draw a line segment in matlab? What is the general coding for drawing a line in matlab? For this one project I have to draw a circle and then draw multiple lines that will connect points on the circle. How to add text labels and annotations to plots in MATLAB ®. A simple line plot Here are the MATLAB commands to create a simple plot of y = sin(3*pi*x) from 0 to 2*pi. Finally (having done enough work for one day) you quit Matlab. I need to plot it at a specific point on the x-axis, and it needs to extend vertically in both directions. Histogram and Pie Chart. The title basically says it all. The general form of the plot function is plot(x,y) where x and y are lists of numbers. 2 - or you can plot their difference in a figure, 3- or using time based characteristics like Overshoot, Undershoot, rise time, settling time of 2 figures, you can show their difference of figures, even you can use ITAE index, method 3 can be down without programming in editor, good luck,. Microsoft Excel support different chart style like bar-graph, piechart, histogram to name a few. Learn more about color, plot, colorcode, rgb MATLAB. Essentially, you Superimposing line plots on images » Steve on Image Processing and MATLAB - MATLAB & Simulink. Set the marker edge color to blue and set the marker face color using an RGB color value. I was thinking of using MATLAB (or R) to plot my report data instead of using Excel. Adding a horizontal line to a plot. m" extension on the command line, for example for circle. There are two files (arrow. A surface is a set of polygons. Learn more about plot, line. I would like to plot a basic line graph with points. Today, I am sharing my experience on MATLAB plotting. Use help in MATLAB for more information on how to use any of these commands. It draws vertical lines (with a little circle at the tip) proportional to the value of the function at that particular horizontal value. If you have a vector with the coordinates [x, y], the vectors [y, -x] and [-y, x] are orthogonal. Learn more about graph, plot, layers, i, j, k, matrix. This MATLAB function creates a contour plot containing the isolines of matrix Z, where Z contains height values on the x-y plane. line(x,y) plots a line in the current axes using the data in vectors x and y. - Applied Example 4. Call this as many times as you want. MATLAB's plotting commands include the "grid on" option, which places a certain number of grid lines on your plot. Here's where I have to wave my hands a little. Use help in MATLAB for more information on how to use any of these commands. grid off Removes grid lines from the current axes. I am trying to plot a vertical line in matlab. A line plot is a graph that shows the frequency of data occurring along a number line. How do I get this to produce a horizontal line at y=0. A typical line plot shows one dimension of data as a function of a one-dimensional domain. Plotting straight line on graph. However, if you don't like the choice of placement, linestyle, coloring, or the number of grid lines, changing these features, while possible, requires an extensive trip through MATLAB's plotting underworld. Open Mobile Search. Learn more about graph, plot, layers, i, j, k, matrix. m) that will plot a line with an arrow on the end of it. I was thinking of using MATLAB (or R) to plot my report data instead of using Excel. Our objective is to plot a line along 2 points in MATLAB without using inbuilt functions for plotting. Plot over an image background in MATLAB T his is a short tutorial that documents how to make a MATLAB plot on top of an image background. Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. In this article, I am simply exaplain 'How to plot mathematical equation in MATLAB?'. The PLOT command, if no color is specified, makes automatic use of the colors specified by the axes ColorOrder property. % matlab >> a = [ 1 2; 2 1 ] a = 1 2 2 1 >> a*a ans = 5 4 4 5 >> quit 16 flops. And it's required mutiple mathematical functions, code for the MATLAB program and writing format on the MATLAB command window. This video shows how to plot a line with two different examples / Import from Excel and Plot in MATLAB - Sylvia Clay - Duration: 8:18. How do you draw a line segment in matlab? What is the general coding for drawing a line in matlab? For this one project I have to draw a circle and then draw multiple lines that will connect points on the circle. Plotting e. Each pixel in the frame has temperature value associated with it. Similarly, we can add another plot in the chart and plot Column C as a function of Column A. Following is a list of commands used in the Control Tutorials for MATLAB and Simulink. plot( [X(1) X(end), [k k] ) would do the job visually if there isn't a reason you need to have a point for every value of your X time series. No plot is drawn on the screen; however, you can plot the function using plot(X,Y). There are two different ways to get multiple data sets plotted in the same figure - use the hold on hold off paradigm or put all the "plot triplets" in a. There are two files (arrow. MATLAB Tutorial - Function Plotting Basics - Plot multiple lines Learn MATLAB in simple and easy steps starting from basic to advanced concepts with examples. I was trying to plot a graphics of 'c vs X' for different 't'(t1,t2,t3 etc) in the same graph using GUI. There are several ways to plot vertical lines in Matlab. Comments can also be used to identify authors, references, licenses, and so on. fplot Intelligent plotting of functions. Learn more about plot. Plot Enhancement Commands. A horizontal line is perpendicular to a vertical line, whose points all share the same x-value. 01 between the points where you will sample the function. A horizontal line is a line whose points all share the same y-value. You can view and download source code for each plot, and use it in your. So I would like to produce two lines on a 2D x,y plot. One thing to keep in mind when using the plot command is that the vectors x and y must be the same length. What is a good way to plot a straight line parallel to y-axis for a particular x value?. or 2) Import data from a file. Small additional suggestion, say you want to label your line in the legend so that it has some meaning, or take advantage of some of the easy to use options in plot, then using "hold", the ylim from the current axis and the "repmat" is very useful. Several people have asked me recently how to plot some kind of shape on top of an image, so I thought I'd show the basic technique here. Matlab Graphics: Line Width Notes: Using LineWidth youcancontrolthewidthofplottedlines. Thank you guys. Matlab's plot3 displays a line plot in 3-D, which is three dimensions of data ( x, y, and z ) over a 1-D domain ( distance along the trajectory. At the and of the cell the only output that Matlab sees as being created by the cell of commands is the second gure. Plot over an image background in MATLAB T his is a short tutorial that documents how to make a MATLAB plot on top of an image background. Text and Annotations in MATLAB ®. The quiver3 takes 6 parameters, x, y, z and u, v, w. Creating a plot using commands. You will see updates in your activity feed; You may receive emails, depending on your notification preferences. For example, in the concurrent/countercurrent flow model, we wanted to calculate the amount of material after each time iteration and plot this on the screen. xlim is actually a function itself that returns the x limits. The basic use of the built-in. This is a very useful tool in all types of scientific and math based research allowing the user. Following that are several lines of comment statements that form a prologue to the function. 1 Posted by Doug Hull , May 30, 2012 This video shows how to put an individual text label on each of a series of points. Plotting a line x=constant. Line Segment - equation of a straight line in Matlab A line segment is a straight line which links two points without extending beyond them. P already represents a generic point with coordinates (x,y,z) and line represents a point on the line. In some rare cases (e. Toggle Main Navigation. Most of the time, you will be plotting three or fewer different lines on a single window, and they can thus be distinguished from one another in MATLAB by using different line styles. Line plots are a useful way to compare sets of data or track changes over time. I have been trying for the while but nothing works. Line and Scatter in MATLAB ®. Im using this code to plot left side figure on attached image. On-line Help Matlab has on-line help for all its commands. The video talks about how in MATLAB you could go about doing line plotting for both 2D curves and 3D curves. y, with a dashed red line. MarkerEdgeColor — Specifies the color of the marker or the edge color for filled markers (circle, square, diamond, pentagram, hexagram, and the four triangles). Matlab Plotting - Horizontal Lines and Vertical lines 1. This can be useful for a variety of things but when I first learned about it, I was a bit confused by how the axes seem to be flipped sometimes when you do this. The following steps help you create a data source and then use that data source to generate a plot. The line should have a length of 54. I need to plot it at a specific point on the x-axis, and it needs to extend vertically in both directions. Today, I am sharing my experience on MATLAB plotting. 5 <= s <= 1? Every time I run the script I get a blank graph. - Basics We are going to create a simple Matlab function to add horizontal lines (and vertical ones) to any given Matlab-created plot. Plotting Data Using MATLAB: In this tutorial you will learn how to use the MATLAB program from MathWorks to create a script file that will make a set of data and plot that data. get(gca, 'ylim') gives you a 2 element array with the lower limit on the y axis, and the upper limit on the y axis, whatever they are. What I actually want is some discrete lines rather than the surface. A horizontal line is perpendicular to a vertical line, whose points all share the same x-value. It will appear in your workspace. This MATLAB graphics tutorial shows you how you can plot multiple lines on the same plot. I have my coordinate data -X and Y vectors- and my velocity vectors U and V all being the same size. If x and y are matrices with the same size, then line plots multiple lines. This video shows how to plot a line with two different examples / Import from Excel and Plot in MATLAB - Sylvia Clay - Duration: 8:18. Line Segment - equation of a straight line in Matlab A line segment is a straight line which links two points without extending beyond them. Plotting e. The function plots columns of y versus x. feather(U,V) displays the vectors specified by U and V, where U contains the x components as relative coordinates, and V contains the y components as relative coordinates. Similarly, we can add another plot in the chart and plot Column C as a function of Column A. I had to use a network analyzer measuring the standing wave pattern along a transmission line taking data points at half mm increments. MATLAB is a technical computer program use for data processing and data visualization. Learn more about plot. How to Make 3D Plots Using MATLAB. And it's required mutiple mathematical functions, code for the MATLAB program and writing format on the MATLAB command window. All of MATLAB's own functions written in MATLAB are documented this way as well. A horizontal line is perpendicular to a vertical line, whose points all share the same x-value. This article is meant to give new users to MATLAB a basic introduction to graphing data. The software I used got me the values in a text file and the way it is formatted, I can't figure out how to make the left side the X axis and right side the Y axis of a plot. We will also see what are the most important and useful color coding functions, marker style and line-specification designing functions available in MATLAB. In other programming language the new line character is "/n"; in MATLAB it is " ". Today, I am sharing my experience on MATLAB plotting. When I took a course in grad school on statistical image processing, I saw a very interesting plot where data is shown as a surf plot and underneath, on the ground or x-y plane, an image is shown. Log Plots in MATLAB ®. The sampling rate is needed if you actually write a function that computes the samples on the circle and plot them as line objects. A horizontal line is perpendicular to a vertical line, whose points all share the same x-value. 25 for the interval 0. A function file starts with a line declaring the function, its arguments and its outputs. It is not meant to cover every detail of graphing in MATLAB, but should cover enough to get you started. Program (1): To show curve in same plot for functions f(x) and g(x) is given below in MATLAB. How to fill the area between two line in a log Learn more about matlab, plot, area. ^2; plot(x, y) MATLAB draws a smoother graph − Adding Title, Labels, Grid Lines and Scaling on the Graph. These files are available on MATLAB Central:. If either x or y , or both are matrices, then line draws multiple lines. I have my coordinate data -X and Y vectors- and my velocity vectors U and V all being the same size. Plotting e. Experiment with the hold on command. For example, in the concurrent/countercurrent flow model, we wanted to calculate the amount of material after each time iteration and plot this on the screen. Learn more about color, plot, colorcode, rgb MATLAB. I would like to plot a basic line graph with points. h=line(X,Y) will give you properties of the line. The b part tells the program to use blue color for the lines and markers. MarkerEdgeColor — Specifies the color of the marker or the edge color for filled markers (circle, square, diamond, pentagram, hexagram, and the four triangles). Step: define the values of the angles to be considered. Plotting a line x=constant. publishing, Matlab runs each cell as a block and then displays any output. Im using this code to plot left side figure on attached image. AFIK, when I use the plot function it creates figure, axis, line objects and then sets the property of each object accordingly. However, if you don't like the choice of placement, linestyle, coloring, or the number of grid lines, changing these features, while possible, requires an extensive trip through MATLAB's plotting underworld. MATLAB - how to make a movie of plots Making a video of your moving graphs/charts is surprisingly easy to do in MATLAB. You will see updates in your activity feed; You may receive emails, depending on your notification preferences. For example if I have 3 clusters in my cluster matrix then I plot them using the line below:. plot line in matlab I believe that the line(x,y) funtion in matlab can be overloaded to be used as a 3D function and thus be used as line(x,y,z). Create a script file and type the following code −. MATLAB allows matrix manipulations, plotting of functions and data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other languages, including C, C++, C#, Java, Fortran and Python. You can use plot3. Surfaces and Grids in Matlab. MATLAB ® graphics give you control over these visual characteristics: LineWidth — Specifies the width (in points) of the line. I have been trying for the while but nothing works. I found a lot of answers about draw lines using the Plot, but it dosen't happend with Hist. get(gca, 'ylim') gives you a 2 element array with the lower limit on the y axis, and the upper limit on the y axis, whatever they are. How to plot multiple lines in a graph?. Even though MATLAB’s plotting procedure looks like a really simplistic approach, it’s actually quite useful for any data you want to plot quickly. plot( [X(1) X(end), [k k] ) would do the job visually if there isn't a reason you need to have a point for every value of your X time series. To see this you need to look no further than the ubiquity of MATLAB's former default colormap jet and the popularity of the MATLAB-inspired plotting package matplotlib in Python, the tool du jour for data scientists. Line and Scatter in MATLAB ®. A function file starts with a line declaring the function, its arguments and its outputs. Once a function m-file is written, debugged, and placed in an appropriate directory, it is for all practical purposes part of your version of MATLAB. Experiment with the hold on command. how to calculate the slope of a line?. I would like to plot a basic line graph with points. For instance, I would like to plot the line y=245. On-line Help Matlab has on-line help for all its commands. EZPLOT is an easy to use function plotter. Using a color bar with your MATLAB plot can help people see data values based on color rather than pure numeric value. Examples of the plot function, line and marker types, custom colors, and log and semi-log axes. Though my meshgrid is quite "discrete", MATLAB always try to generate surface for me. Since both y values are the same, the line will be horizontal. Step: define the values of the angles to be considered. Following that are several lines of comment statements that form a prologue to the function. Typing plot(z) will plot the values of z against a list of 1,2,3,4,5, etc. MATLAB Workshop 15 - Linear Regression in MATLAB Objectives : Learn how to obtain the coefficients of a "straight-line" fit to data, display the resulting equation as a line on the data plot, and display the equation and goodness-of-fit statistic. - paddy Jun 6 '13 at 4:37. Line and Scatter in MATLAB ®. If you are trying to get a 45 degree line on the screen (rather than in the data space and without using equal axis) you would need to get the displayed size of the axes and your screen resolution and figure it out the required data from that. How to label a series of points on a plot in MATLAB. Matlab plotting line style Just like it is to change the color of your plot in Matlab, the same goes for changing the line style, increasing the thickness of the line or some other aspect of it Let's go ahead a plot the following code. We're going to use paremetric equations to describe a circumference in 5 easy steps. A surface is a set of polygons. In this article we're going to develop three functions to work out equations of straight lines in Matlab with different approaches. I am currently trying to plot a simple vertical and horizontal lines in MATLAB. It is not meant to cover every detail of graphing in MATLAB, but should cover enough to get you started. Tag: matlab,cell I have a 1x10 ( say 10 because it is actually 262144, but for the purpose of my question, 10 is enough) cell array called x. How to draw a Circle in Matlab This also works in GNU-Octave, FreeMat, Scilab and Scicoslab 2. Plot a straight line in Matlab 1. Examples of the plot function, line and marker types, custom colors, and log and semi-log axes. The plot above uses the default MATLAB line width of 0. Learn more about find slope, slope. If you set Clipping to off , lines are displayed outside the axes plot box. The MATLAB plot gallery provides examples of many ways to display data graphically in MATLAB. You will need to read up on the plot function: help plot or doc plot. Give the command before giving the command for the plot you want to appear in the new window. Comments on Programming Style 1. How to draw a Circle in Matlab This also works in GNU-Octave, FreeMat, Scilab and Scicoslab 2. I ran linprog() and got the values: 1. This video shows how to plot a line with two different examples / Import from Excel and Plot in MATLAB - Sylvia Clay - Duration: 8:18. Use Name,Value pairs to specify the line width, marker size, and marker colors. Matlab considers each column passed to plot to represent a separate line segment. The power of MATLAB really comes into play when you add your own functions to enhance the language. Examples of the plot function, line and marker types, custom colors, and log and semi-log axes. Plotting e. I have 1700 plot of data in graph. Whether it's for research, a school assignment, or a work presentation, 3-D plots are great for visualizing what a complicated set of data looks like. I was thinking of using MATLAB (or R) to plot my report data instead of using Excel. I need to take the legend out of the plot in order to create a figure for a paper but I want to keep having the legend that Matlab gives me. I want to plot a line over each grouped bar plot, like on the figure below. You can plot a straight line just as you would plot any other function in Matlab. It was originally designed for solving linear algebra type problems using matrices. The best way to work with color bars is to see. I ran linprog() and got the values: 1. I cannot use the yline function. The software I used got me the values in a text file and the way it is formatted, I can't figure out how to make the left side the X axis and right side the Y axis of a plot. Surfaces and Grids in Matlab. Plot a straight line in Matlab 1. I have been trying for the while but nothing works. The MATLAB plot gallery provides examples of many ways to display data graphically in MATLAB. Widely, eight colors are used for MATLAB graph. And it's required mutiple mathematical functions, code for the MATLAB program and writing format on the MATLAB command window. Matlab plotting line style Just like it is to change the color of your plot in Matlab, the same goes for changing the line style, increasing the thickness of the line or some other aspect of it Let's go ahead a plot the following code. Line and Scatter in MATLAB ®. To plot an anonymous function, you must use “fplot” even if your function is not named "f". Discover what MATLAB. All parameters should be of the same dimensions and the function returns the handle of all line vectors. I would like to plot a basic line graph with points. Step: define the values of the angles to be considered. A line plot is a graph that shows the frequency of data occurring along a number line. matlab,time-frequency My bet is that trf is a very large matrix. You can plot a straight line just as you would plot any other function in Matlab. The following table contains a listing of the line plot. Plot each line with a different colour, label the axes, and include a legend. So how do I plot a Fourier series in Matlab? Conceptually it should be a series of 2k+1 vectors in t, summed together, but I don't understand how to do that, or how to plot the result, let alone use that to demonstrate the Gibbs phenomenon. Add a title and axis labels to the graph using the title, xlabel, and ylabel functions. Likewise, for plotting the graph on MATLAB, we have different colors code or functions. To see this you need to look no further than the ubiquity of MATLAB’s former default colormap jet and the popularity of the MATLAB-inspired plotting package matplotlib in Python, the tool du jour for data scientists. Preventing MATLAB from putting a new plot on top of an old one. Similarly, we can add another plot in the chart and plot Column C as a function of Column A. I don't think that is an option, unless they have added it since last I looked. 1 : 2*pi; y1 = sin(x); y2 = cos(x); plot(x, y1, '-', x, y2, '+') Note: Ordinarily Matlab prin ts the results of eac h calculation righ ta w a y. m" extension on the command line, for example for circle. They are easy to plot in Matlab. How to plot multiple lines in a graph?. You can plot a straight line just as you would plot any other function in Matlab. We’re going to use paremetric equations to describe a circumference in 5 easy steps. We will now go one step further and find out how to create multiple plots in MATLAB. (This will change the resolution). This article is meant to inform new MATLAB users how to plot an anonymous function. Have you ever had to plot many lines on a single graph and you had to construct additional Colors for Your Multi-Line Plots » File Exchange Pick of the Week - MATLAB & Simulink Toggle Main Navigation. There are several ways to plot vertical lines in Matlab. Then you establish x, y (and z if applicable) according to the equations, then plot using the plot(x,y) for 2D or the plot3(x,y,z) for 3D command. This MATLAB function creates a contour plot containing the isolines of matrix Z, where Z contains height values on the x-y plane. Then you defined matrix a and computed its square ("a times a"). You can view and download source code for each plot, and use it in your. MATLAB is a technical computer program use for data processing and data visualisation. So, for your example, we are interested in having 2-D Line Graph. On-line Help Matlab has on-line help for all its commands. Learn more about lines, points, draw, text file. Well, My question is: I need to draw a vertical line in a specific point. ? Ever want to change the default order so that it plots curves with the color order you want instead of the default color order, and without having to specify the color in every single call to plot()? If so, run the attached demo. Whether it's for research, a school assignment, or a work presentation, 3-D plots are great for visualizing what a complicated set of data looks like. feather(U,V) displays the vectors specified by U and V, where U contains the x components as relative coordinates, and V contains the y components as relative coordinates. - paddy Jun 6 '13 at 4:37. A horizontal line is perpendicular to a vertical line, whose points all share the same x-value. Matlab replaces the old plot with the new one, if you do not hold. Program (1): To show curve in same plot for functions f(x) and g(x) is given below in MATLAB. We will now go one step further and find out how to create multiple plots in MATLAB. Learn more about graph, plot, layers, i, j, k, matrix. Each pixel in the frame has temperature value associated with it. 25 for the interval 0. Call this as many times as you want. Line and Scatter in MATLAB ®. The b part tells the program to use blue color for the lines and markers. Is it possible to draw an arc instead of a line between the two point going from the starting point to the end point. The example below will show you how to show multiple graphs in the same plot using plot command in MATLAB. e after plot of line 1 (t1), it will wait for input of t2 to plot line 2 and so on). Any suggestion to set the contour for not plotting upper a black line? Im looking for a result like the right side figure (edited on paint). We're going to use paremetric equations to describe a circumference in 5 easy steps. However, if you don't like the choice of placement, linestyle, coloring, or the number of grid lines, changing these features, while possible, requires an extensive trip through MATLAB's plotting underworld. I have a 3d matrix named cluster. For example, this code plots a line with crosses at the data points. Related Properties. Plotting a line x=constant. Use a solid line for sin (x) and the sym b ol + for cos(). - Video (alternative code) 1. Finally (having done enough work for one day) you quit Matlab. The video talks about how in MATLAB you could go about doing line plotting for both 2D curves and 3D curves. When plotting data it is often necessary to plot a horizontal line through a specific point to emphasize a particular point or area. I found a lot of answers about draw lines using the Plot, but it dosen't happend with Hist. In these tutorials, we use commands/functions from MATLAB, from the Control Systems Toolbox, as well as some functions which we wrote ourselves. How to plot a line of a certian color. On-line Help Matlab has on-line help for all its commands. If you want to plot both markers and a line, you can use the plot function and specify a line style that includes marker symbols and a line style, such as '-x'. For instance, I would like to plot the line y=245. The basic use of the built-in function plot is: plot(x, y) where x = array of x-values y = array of y-values---. MarkerEdgeColor — Specifies the color of the marker or the edge color for filled markers (circle, square, diamond, pentagram, hexagram, and the four triangles). We will solve the equation of the line for z, and use the MATLAB plotting function ezsurf to plot the result. Plot the average h(t) obtained by averaging the h(t) corresponding to the individual values of beta used in the previous exercise. h=line(X,Y) will give you properties of the line. Following that are several lines of comment statements that form a prologue to the function. Matlab plotting line style Just like it is to change the color of your plot in Matlab, the same goes for changing the line style, increasing the thickness of the line or some other aspect of it Let's go ahead a plot the following code. What is a good way to plot a straight line parallel to y-axis for a particular x value?. Creating a plot that uses differing line types and data point symbols makes the plot much easier for other people to use. The MATLAB plot() function can actually take an additional third input that tells it what color, what type of line, and what type of marker ("dot" on each point) to use. y= hx1*x + hInt; % highest confidence interval I want to plot as linear plot(x,y, 'b--' ) % plot highest confidence interval As its on a semilog plot the output is a curve. Essentially, you Superimposing line plots on images » Steve on Image Processing and MATLAB - MATLAB & Simulink. How to make a plot with logarithmic axes in MATLAB ®. Small additional suggestion, say you want to label your line in the legend so that it has some meaning, or take advantage of some of the easy to use options in plot, then using "hold", the ylim from the current axis and the "repmat" is very useful. xlim is actually a function itself that returns the x limits. Plotting Multiple Lines on a Figure in MATLAB - Video - MATLAB Cambiar a Navegación Principal. I tried to create a plot without using the plot function but I am confused why it is not working. I would like to plot path lines of my fluid particles which are flowing through a porous medium. I don't think that is an option, unless they have added it since last I looked. In these cases, the surface has so many edges (coloured black by default) that they completely clutter the image, and you don't see the surface patches One solution for that is to remove the edges: surf(trf, 'edgecolor', 'none'). MATLAB allows you to add title, labels along the x-axis and y-axis, grid lines and also to adjust the axes to spruce up the graph. Plot the function. Animation in Matlab For Summer 1997 Envision-It! Workshop One of the uses for Matlab is to make a series of calculations and plots.