Multiplot in a Graph using Octave

Basicly figure command creates a blank graph view. You can create a blank view then hold the view and draw plots.

> t = 0:0.001:0.1;

>f = 100;

>figure;

> hold on;

>plot(t,sin(2*pi*f*t)) ;

>plot(t,cos((2*pi*f*t));

maybe you can add some labels then;

> grid

>xlabel ‘time in seconds’

>ylabel ‘amplitude’

> title ‘sin and cos’

And maybe you wanna save the graph into a file in different formats like png or jpg and different sizes

>print “-S480,640” -djpg SinCos.jpg

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s