Description

MathPro is a numerical computing environment and programming language mostly compatible with Matlab. You can implement any numerical method using this program. MathPro is designed in order the user interact more efficiently. Is caracterised by:

  • Programs can be viewed or edited using the present famous mobile text editor
  • Writing programs more efficiently and solve any mathematical problem.

This Mathematical tool for mobile phones is a Must-have tool for students, professionals and scientists. MathPro's interface integrate standard mathematical notation, programming statements, and text in a single worksheet. Is very flexible, fast, and more professional. It runs on handheld mobile devices running java (MIDP 2.0, cldc 1.1).


Vectors and Matrices
linspace(var1,var2,COUNT) vector with COUNT numbers ranging from var1 to var2
length(vector) number of elements in vector
zeros(ROWS[,COLUMNS]) create array of all zeros
ones(ROWS[,COLUMNS]) matrix of ones
eye(ROWS[,COLUMNS]) matrix with diagonal one
size(matrix) number of rows and columns
sum(var) if var is a vector: sum of elements, if var is a matrix: sum of columns.
max(var) largest element in var
min(var) smallest element in var
det(matrix) determinante
eig(matrix) eigenvalues
inv(matrix) inverse

lu(matrix) LU-decomposition
diag(matrix) extracts diagonal elements

Polynomials
polyval(v,var) generates a new value (estimate) of y at var based on the coefficients vector v found with polyfit.see example 10
polyfit(x,y,n) finds the coefficients of a polynomial p(x) of degree n that fits the data, p(x(i)) is approximately equal to y(i), in a least-squares sense. see example 10

Plotting
plot(x,y) x and y being equalsized vectors, which denote the coordinates of the data points to be plotted. see example 13
plot(x,y,option) A third optional argument option specifies plot options like colors and symbols. see example 13

Comparison and Logical Operators
Less x < y
Less or equal x <= y
Larger x > y
Larger or equal x >= y
Equal x == y
Not equal x ˜= y
And x & y
Or x | y
Not ˜x

Arithmetic Operators
Addition x + y
Subtraction x - y
Multiplication x * y
Division x \ y
Exponentiation x ˆ y
Range x:y:z
Assignment x += z
Assignment x -= z
Assignment x /= z
Assignment x *= z
Postincrement x++
Postdecrement x--

Scalar Functions
rat(var) var as exact number
real(var) real part of var
imag(var) imaginary part of var
abs(var) absolute value of var
sign(var) sign of var
conj(var) var conjugate complex
sqrt(var) squareroot
exp(var) exponential
ln(var) natural logarithm
log(var) decimal logarithm
sinh(var) hyperbolic sine
cosh(var) hyperbolic cosine
asinh(var) hyperbolic areasine
acosh(var) hyperbolic areacosine
sin(var) sine (radian)
cos(var) cosine (radian)
tan(var) tangens (radian)
asin(var) arcsine (radian)
acos(var) arccosine (radian)
atan(var) arctangens (radian)
fact(n) factorial n!

Comment statements

MathPro comment statements begin with the percent character, %. All characters from the % to the end of the line are treated as a comment.

Flow Control

MathPro supports the basic flow control constructs found in most high level programming languages, the same as in MathLab language.

Branches if constructs

MathPro supports these variants of the ``if'' construct

  • if ... end
  • if ... else ... end
  • if ... else if ... else ... end end

Jumps
return, continue, break
A function may be prematurely left using return.
continue and break are used in loops: continue jumps back to the start of the loop, and begins another cycle. break permanently leaves the loop.

Loops:
For Loops

The for loop allows us to repeat certain commands. If you want to repeat some action in a predetermined way, you can use the for loop. All of the loop structures in MathPro are started with a keyword such as "for", or "while" and they all end with the word "end".

The for loop is written around some set of statements, and you must tell MathPro where to start and where to end. Basically, you give a vector in the "for" statement, and MathPro will loop through for each value in the vector:

While Loops

If you don't like the for loop, you can also use a while loop.

The while loop repeats a sequence of commands as long as some condition is met.

Programming in MathPro
break Terminate execution of for or while loop
continue Pass control to next iteration of for or while loop
else Conditionally execute statements
end Terminate conditional block of code
error Display error message and exit the program
disp Display error message and exit the program
for Execute block of code specified number of times
if Conditionally execute statements
return Return to invoking function
while Repeatedly execute statements while condition is true>
write display text and variables
( ) Pass function arguments
% Insert comment line into code
eval eval(expression) executes expression, a string containing a valid MathPro expression. see examples 7 and 8
function declare a function. see below examples

Examples included in MathPro
Example 1 Gauss Elimination
Example 2 TDMA Solver
Example 3 Bisection
Example 4 Falsposition
Example 5 Secant
Example 6 Newton Raphson
Example 7 Integral Trapezoid
Example 8 Integral Simpson
Example 9 Runge Kutta 4
Example 10 Interpolation
Example 11 Finite Difference
Example 12 Heat Explicit Solver
Example 13 Plotting Data

 

 

Create an account



News Briefs