Matlab Plot

Let us plot the simple function y x for the range of values for x from 0 to 100 with an increment of 5.
Matlab plot. Create a script file and type the following code x 0 5 100. There are various functions that you can use to plot data in matlab this table classifies and illustrates the common graphics functions. You can view and download source code for each plot and use it in your. Types of matlab plots.
Matlab plots each matrix column as a separate line. Figure plot y specify line style. Specify the plotting intervals using the second input argument of fplot. In this example we will draw.
Specify the color of the plotted lines as blue using b. Plot three sine curves with a small phase shift between each line. Plot x y when you run the file matlab displays the following plot let us take one more example to plot the function y x 2. Plot multiple lines using hold on.
Use the default line style for the first line.