Matlab Plot Command

Use array operators instead of matrix operators for the best performance.
Matlab plot command. After reading the matlab plots topic you will understand how to create plots and you will know how to use various plot commands in matlab. Function to plot specified as a function handle to a named or anonymous function. This article is meant to inform new matlab users how to plot an anonymous function. Specify a function of the form y f x.
In this example we will draw. 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. Types of matlab plots. Plots are useful in providing information in picture view and matlab provides the facility for creating a plot using plot command.
This method requires little experience in programming so dive in with step one to get started. The function must accept a vector input argument and return a vector output argument of the same size. How to plot a function in matlab. Let us plot the simple function y x for the range of values for x from 0 to 100 with an increment of 5.
Web browsers do not support matlab commands. There are various functions that you can use to plot data in matlab. The plot function plots columns of y versus columns of x. Create a script file and type the following code x 0 5 100.
Run the command by entering it in the matlab command window. Run the command by entering it in the matlab command window. The plot command in matlab help to create two dimensional plots.