Saturday, April 18, 2009

Simple graphs - 3

I ask excuse me because I was doing other things, like a paper, and I could not post since 4, April.

Now, I finished the paper, and other things.

Let's continue talking about the plot(.) function.

The command for create a new window is scf(), it creates a blank window.
If you have a used window but you want to clear it, so you use the command clf();

Those commands (scf() and clf()) have no arguments.

The scf() is utile for show many graphs simultaneously, like the following example.

The script is following, too:

-->x = 1:100;

-->w1 = %pi/3;

-->y1 = cos(w1*x);

-->w2 = %pi/7;

-->y2 = cos(w2*x);

-->plot(x, y1);

-->scf(); plot(x, y2);



The next posts will present how to change the colors and styles of the graphs, and how to put labels on the graphs.

No comments: