Matrix Computation |

| HOME | Matrix is in fact one of the foundation classes of Noobeed. Its original design is oriented toward photogrammetery, image processing, and GIS. However, since Matrix mathematic is proved to be very useful in solving scientific problems, it natural characteristics is made available by Noobeed as much as possible. At the moment almost all basic matrix operations are included in Noobeed. These include those functionalities of image processing if a matrix is thought of as an image. The following are summary of built-in class functions of Matrix object. - basic matrix operations, such as inversion, transpose, multiplication, addition, subtraction, reduced row-echelon form, eigen values and eigen vectors, rank, determinant, LU decomposition, etc.
- extraction and assignment from and to any portion of a matrix.
- extraction and assignment from and to a row or a column or a group of rows and column.
- reset, linear generated, initialize, diagonal, identity matrix
- concatenation left right up down
- flip, rotate, in any direction, and by any arbitrary angle, swap row, swap column
- scientific and trigonometric functions (sin, cos, tan, asin, acos, atan, atan2, abs, ln, log, random, etc.)
- vector products, cross, dot, norm, angle
- statistics, min, max, mean, standard deviation, variance, covariance, correlation, percentile.
- sorting by row, column, or all.
- convolution and predefined filters (mean, median, Gaussian, mode)
- matrix comparison (min, max)
- graphic drawing on a matrix, line, poly-line, text, circle, ellipse, rectangle, square, symbol, fill polygon
- load and read from TIF, BMP, ASCII and generic binary format, with an option to skip a header.
- image processing (boundary, polyline finding, flood polygon, binarize, reclass, reassign, edge detection, no of connected pixels, Fast Fourier Transform and Inverse Fast Fourier Transform, lookup table, image stretching, anaglyph image generation)
- convert to RGB, RGBAUTO, including some 10 predefined color-maps, besides user defined colormaps are enable.
- virtually loaded matrix, (interactive directly read from a file) capable of handle an unlimited size of matrix.
- find data in a matrix with an unlimited of any combination of logical operations, e.g. find(A.>=78 & A <= B)
- 8 types of premitive data available, namely complex, double, float, integer, short integer, unsigned character, and boolean. All types are convertible to each other, as well as converting to vector, vector of point (2D, 3D, with/without ID).
- ability to assign value, turn on and off of null data
->a = [ 1 2 3; 4
5 6; 7 8 9]
->a = [1 2 ; 3 4]
The following is an example to use Matrix operation to solve a linear regression problem. Here we have the following data set, in which the first column is x and the second column is y.
The relation between x and y is y = ax + b, where a and b are unknown parameters needed to be solved. Suppose that the data is stored in a file, named "data_xy.txt". To read the data into a matrix, we do the following:
Now we want to extract x coordinates and y coordinates and stored them in a different matrices. We do the following.
We are going to solve this problem by the Least Square Adjustment technique. The first thing is to form the so-called design matrix, "A", which is nothing but the following.
And we will have the so-called observation equation, writen in a matrix form as follows.
where, Y is an observation vector, and x is an unknown parameter vector, [a b]'. The reader should realize the difference between matrices "X" and "x". To create the matrix "A", we do the following.
The above instruction is to take the matrix "X" and cancate it with a column matrix of 1.00. Now, to solve for the values of vector "x", we
have to calculate x = (A'A)
Therefore, the value of a = 1.99925 and b = 10.09815. The linear regression model is ended up with the following formula:
| HOME | |