Think++ Help File
   

             

 

 

 

 

 

Think++ Functions
 

 

 

 

 


General Overview
Simple Functions
Working with Matrices
                     

Matrix Overview
Matrix Arithmetic  
Matrix Logical
   
Matrix Relational
 
Arithmetical & Logical Operations
Other Functions
 
   

Matrix General Overview

Think++ matrix functions are built so that the logical, arithmetic and relational operations can be carried out on an array of numbers. The matrix can also be used to carry out graph functions as the values in a data series can be stored in a matrix and then assigned to a variable. Hence the matrix functions are very versatile. The three matrix operations are listed in the menu and as for details of all the functions under these headings they can be found under the arithmetical & logical operations menu or other functions menu.

 

 

 

Matrix Arithmetic

Matrices can be added, subtracted, multiplied and divided. To carry out any of the arithmetic functions on the matrices a data series needs to be set inside the matrices. The elements or data series to be defined needs to be placed inside square brackets followed by a semicolon to each row and column. Below is an example of how a matrix is defined.

Example: ‘Arithmetic1 = Matrix1 + 10’
where ‘Arithmetic1’ is a new variable name,
‘=’ is the assignment operator,
‘Matrix1’ is a matrix variable, previously defined,
‘+’ is the arithmetic operator.
‘10’ is the number added to each matrix element.

The same functions can be carried out for all the other arithmetic functions. For full details go to arithmetic and logical operations.

Matrix Logical Operations

Matrix logical operations can be carried out upon two matrices at a time. These include the following functions such as AND, OR, XOR, and NOT. These functions can be used to compare to matrices for either graphical representation or mathematical calculations. An example of how this can be implemented is shown below:

Example:

A=1
B=2

A&B=C

This is just a simple example of where logical operations can be used. The symbols and for the logical operations is as follows: ~ NOT, & AND, | OR, and XOR for NOR

Matrix Relational Operations

The matrix functions with relational operators is another functions within Think++. The ability to use relational operators is can be used for comparison when carrying out mathematical functions or when creating programs in the T-File editor. Also the relational operators can be used in matrices for the function of plotting graphs.
The relational operators carry out the six relational operators of ‘less than’, ‘less than or equal to’, ‘greater than’, ‘greater than or equal to’ and ‘equal to’ and ‘not equal to’. These are used within conditional statements such as ‘if…then’ statements, within the function editor.

Below are the relational operators and their functions:
<’ for ‘less than’, ‘<=’ for ‘less than or equal to’, ‘>’ for ‘greater than’, ‘>=’ for ‘greater than or equal to’, ‘==’ for ‘equal to’ and ‘~=’ for ‘not equal to’.

Each relational operator has to have a preceding and succeeding item, which can be a mathematical function, a variable, a number, or an expression containing a combination of these.

Example: if a >= 27 …statements…

For more details click here.


 
       
 
 
 
     
                                       
  Copyrighted 2003       All Rights Reserved