Suppose we want to plot the graph of a function. This can be done as shown in the following script:
x = 0:0.01:15; // the vector of argument x y = sin(x)^2+0.01*x^2; // the vector of the fuction values clf(1) // clears figure window no. 1 figure(1) // sets the current figure window no. 1 plot(x,y) // plots
The result will be the following plot: