|
|
MatrixWhy does Matlab concentrates on Matrix than other form of calculations?First of all, the applications that directly involve matrix demand a powerful software tool such as Matlab. Second, algebra, statistics, and calculus can all be reduced to matrix calculations. Thirdly, approaching computer calculations from matrix base is sensible because computers handle finite quantities. What do you mean when you say computers handle finite quantities, and thus matrix is suitable for calculations? Computers deal with finite quantities. Computers can not deal with abstract concepts directly. Not just computers, but even humans are not comfortable dealing with abstract concepts. The history of mathematics show that humans slowly learn to and are still learning to handle greater degree of abstractions. Thus, matrix which involves manipulation of finite numbers is suitable for computing. How do we define matrix in Matlab? Consider the example of a 3 x 3 matrix: 1X + 1Y + 2Z = 9 2X + 4Y - 3Z = 1 3X + 6Y - 5Z = 0 In the matrix form: AX=B The matrix can be defined in Matlab, each row separated by semi-colon as follows: Not that commas or space can separate items in the matrix.
How the above set of equations be solved? Find the inverse of A, and the multiplying the inverse of A with B produces the result. A-1AX=BA-1 X= BA-1 This can be easily done with Matlab as follows:
|