Friday, April 10, 2009

PLOTTING GRAPHS IN UBUNTU

GNU OCTAVE is a powerful tool on Linux which is similar to MATLAB for Windows. The syntax is almost the same.
It is easy to install.
The installation can be done as:
system -> Administration -> synaptic packet manager
select octave3 from the package and install it.

Given a set of data with two variables gm and id.

Open up a terminal.
Type octave
octave:1>gm = [ gm values copied from the data given]
//press q to escape the END statement
octave:2>id = [ id values copied from the data given]
octave:3>plot (gm,id)
octave:4>xlabel('gm')
octave:5>ylabel('id)
octave:6>title('gm vs id curve')

to save the plot, go back to the terminal,
octave:7>print("figure1.png")
octave:8>reload

NOTE: Please make sure that matrix mismatch does not occur in gm and id inputs.

2 comments:

  1. Thanks a load. Just given me the feel of Octave. Exactly what i was looking for.
    Thanks again.

    ReplyDelete