Getting Start

 

| HOME |

In this section you will learn


| HOME | UP |

How to start running and interactively instruct Noobeed to do a simple caluclation

Noobeed software comes with ONE single executable file, "nb.exe".  Just copy it to any desired directory.  You may want to create a new directory for it.  To run it, just go to the directory where the file "nb.exe" is and double click at it, or if under the DOS prompt, just type "nb".

It will take a little while to load the program.  Once loaded, it will display a welcome message, including the software version, user name and serial ID.

The prompt sign of Noobeed looks like an arrow:

                ->

The user works interactively with Noobeed by enter a statement from the prompt.  To quit Noobeed, simply type "quit" at the prompt.

The following is a head start tour.  Please keep in mind that every line must end with a carriage return.

->set format "sci" change the output format to scientific format
->a = 10 assign a value of 10 to a variable "a"
->a

ans =     1.00000e+001

want to find out the value of a, just type a

Notice that "ans" is also a variable, since this is considered a non-void expression. 

->set format "fix" change the output format back to fix decimal point format
->set precision 10 change the output precision to 10 decimal digits
->print a

  10.0000000000

print value of "a" again

 

->b = a+(-5*2+3.5^4) up to 100 parentheses can be put in one expression
->A = [ 1 2; 3 4; 5 6] A is a matrix
->A

ans =

  no of row    : 3
  no of column : 2

  0:     1.0000000000     2.0000000000
  1:     3.0000000000     4.0000000000
  2:     5.0000000000     6.0000000000
 
print A

Notice that the variable "ans" change its type from double to Matrix

 

->list var

Name               (Class : Index)

A                  (MATRIX : 0)

a                  (DOUBLE : 0)

ans                (MATRIX : 1)

b                  (DOUBLE : 2)

list variable on the screen

In the parenthesis are data type, or class, and index number of an array of that class.

Notice that index 1 of DOUBLE is still available, use to be used by the variable "ans"

 

->B = sin(a)*sin(b) + A.sin() The first two function are global function.  The last function is class function of Matrix.  This expression return a Matrix, assigned to "B".
->B

ans =

  no of row    : 3
  no of column : 2

  0:     0.1041124004     0.1215594907
  1:     0.1389959502     0.1564164677
  2:     0.1738157368     0.1911884573
print B

 


| HOME | UP |

How to interrupt Noobeed

At any time, the user can interrupt Noobeed processing by pressing "CTRL C".  This is done by pressing the "CRTL" button and "C" button together.

When running a program in Noobeed, Noobeed will check a status of the interrupt signal, "CTRL C", at the beginning of every single statement and inside some certain functions (see below).

At the command prompt in the interactive mode, Noobeed checks the interrupt signal, "CTRL C", ONLY in some certain functions that may be time consuming, such as image rectification, matrix printing etc.  In other words, not all built-in functions of Noobeed can be interrupted.  For example function "inv", inversion of Matrix, has an interrupt check inside the function, while matrix multiplication does not have an interrupt check.  For those functions which do not have an interrupt check, once the user presses "CTRL C", nothing will happen, thus the processing will not stop, however keep doing until it is done.  This is because checking interrupt may decrease computation speed.  Imagine a busy on-duty housewife who has to keep coming to the door to check whether there is someone knocking at the door. 

 


| HOME | UP |

The init file "nb.ini"

At the strating of the running of Noobeed. The program will search for the init file "nb.ini" in the same directory that nb.exe resides.  If found the program will set the specific 3 path names according to the content of the file "nb.ini", namely data path name, program path name and function path name.

You can use the commands "set path" "set pathprg" and "set pathfun" to change the path names latter.

If the file "nb.ini" does not exist or does not reside in the same directory as Noobeed does, the default path names of data program and function will be the directory that stores Noobeed.

The file "nb.ini" must consist of 4 lines.  The first line is the word "nb.ini" followed by the path name of data, the path name of program and the path name of function.  The file can have comment lines which are lines beginning with the "/" sign.

Here is an example of the content of an init file "nb.ini":

nb.ini

/ init file for Noobeed

 /data path name

d:\temp

/ program path name

d:\prg

/ function path name

d:\fun

 .


| HOME | UP |

The special variable “ans”

A special variable, named “ans”, is used to store the answer of the last expression evaluation.  The variable “ans” is utilized whenever the evaluation of an expression does not return ‘void”, and there is no assignment to the expression.  This is to give you a chance to store the result you have just calculated.

For example, the fastest way to calculate an expression is to type it right away at the command prompt, like

                     ->(1.59 + 2.32) ^ 0.5

Once press the enter, Noobeed evaluates the function and will print

                     ans =

                            1.977

Because this expression returns a value, not a void expression, and the user does not specify a variable to store it, Noobeed will store the result in “ans”.  If you do want the result, you can type

                     ->X = ans

Now the answer is permanently stored in a variable X.

Please note that the variable “ans” will change its value as well as its data type each time, if an expression is evaluated without any assignment.  Moreover, the variable “ans” is not a reserved word, the user can as well assign a value to it.  But better watch out, since “ans” is also used by Noobeed by the above-mentioned purpose.   


| HOME |