Latest from Indian Defence..

Friday, December 4, 2009

Elementary Mathematics

Back to LKG / UKG and standard 1st :)

Ok, lets pitch up with some basic calcs :
Oh yes, the octave:> thingy is the "prompt"....


octave:> 1 +1
ans = 2
octave:> 1+100;
octave:>


"Hey, hey hey .... hold your cats right there bro. Ok that 1+1 printed the ans as 2, but what about that 1 +100 calculation?? It didnt print... oh !! bugs right??"


Okay,

We may prevent octave from outputting results to the terminal by appending our commands with the semicolon “;”.

and if you want the results of your command to display ,do not append your command with a semicolon .


So going forward , we may try out some combinations like :

octave:21> 2 * 3

ans = 6

octave:22> 9 - 45

ans = -36

octave:23> 67 * 20

ans = 1340

octave:24> 23 ^ 15

ans = 2.6664e+20

octave:25>

Oh, those :21, :22s are the command numbers actually :):) ( i guess so :) )


Starting and Exiting Octave

Yep,

In order to launch Front end:
1. Either navigate thru Applications,
or
2. Type the following on terminal and hit 'enter' gently :)

qtoctave
Which will then launch the frontend , which looks like :



Now for exiting from Octave, just type:

> quit;

Installing Octave

Well,

On a Fedora machine powered with Internet,just like the one I have, log into terminal (... hmmm.. the command prompt for Linux...eh !! ), sudo using the command

> su


followed by your password,

> yum -y install qtoctave


.. ta da... !!

you will have octave as well as its GUI named QTOctave available for exploring.

Hmmm... I should have placed a post regarding yum, Synaptic Package manager, and building of .tar files... but then why is Internet for??.... ha ha !!