- 1). Clear all active variables within the Command window by entering "clear all" in the Command window.
- 2). Create sample data to plot by entering "x=1:1:100" and "y=rand(1,100)" in the Command window. This creates an array of 100 numbers that starts at 1 and ends at 100 for the "x" data, and an array of 100 random numbers for the "y" data.
- 3). Plot the data created in Step 3 by entering "plot(x,y)" in the Command window. A new window labeled "Figure 1" will appear, showing the data plotted using a solid line.
- 4). Close the figure window by clicking on the "x" icon located in the top right corner. Alternatively, select "Close" from the File menu located in the figure window.
previous post