Open links in new tab
  1. plot - 2-D line plot - MATLAB - MathWorks

    Create a line plot and use the LineSpec option to specify a dashed green line with square markers. Use Name,Value pairs to specify the line width, marker size, and marker colors. Set the marker edge color to blue and set the marker face color using an RGB color value.

  2. yline - Horizontal line with constant y-value - MATLAB - MathWorks

    Add a horizontal line to the first plot by passing ax1 to the yline function. tiledlayout(1,2) ax1 = nexttile; x = -pi/2:pi/60:pi/2; y1 = tan(sin(x)) + cos(sin(x)); plot(ax1,x,y1) ax2 = nexttile; x = -pi/2:pi/60:pi/2; y2 = tan(cos(x)) + exp(x); plot(ax2,x,y2) yline(ax1,1.0);

  3. plot3 - 3-D line plot - MATLAB - MathWorks

    To plot a set of coordinates connected by line segments, specify X, Y, and Z as vectors of the same length. To plot multiple sets of coordinates on the same set of axes, specify at least one of X , Y , or Z as a matrix and the others as vectors.

  4. Create Line Plot with Markers - MATLAB & Simulink

    Create a line plot with 1,000 data points, add asterisks markers, and control the marker positions using the MarkerIndices property. Set the property to the indices of the data points where you want to display markers. Display a marker every tenth data point, starting with the first data point.

  5. how to label lines on a graph - MATLAB Answers - MATLAB …

    Dec 1, 2011 · I have a program which asks for variable values of k. A function inputs these into an equation and displays a line on a graph for each value of k. How can i label each of these lines with the value of k used for each.

  6. Labels and Annotations - MATLAB & Simulink - MathWorks

    You can create a legend to label plotted data series or add descriptive text next to data points. Also, you can create annotations such as rectangles, ellipses, arrows, vertical lines, or horizontal lines that highlight specific areas of data.

  7. xline - Vertical line with constant x-value - MATLAB - MathWorks

    This MATLAB function creates a vertical line at one or more x-coordinates in the current axes.

  8. Add Legend to Graph - MATLAB & Simulink - MathWorks

    Create a figure with a line chart and a scatter chart. Add a legend with a description for each chart. Specify the legend labels as inputs to the legend function.

  9. Add Title and Axis Labels to Chart - MATLAB & Simulink

    Create Simple Line Plot. Create x as 100 linearly spaced values between -2 π and 2 π. Create y1 and y2 as sine and cosine values of x. Plot both sets of data.

  10. Create Chart with Two y-Axes - MATLAB & Simulink

    For example, plot three lines against the single y-axis. xx = linspace(0,25); yy1 = sin(xx/4); yy2 = sin(xx/5); yy3 = sin(xx/6); plot(xx,yy1,xx,yy2,xx,yy3) Add Second y -Axis to Existing Chart

Refresh