Matrix calculations and operations using Java
Code: "matrix0.py". Programming language: Python DMelt Version 1. Last modified: 05/09/2015. License: Pro
https://datamelt.org/code/cache/matrix0_1456.py
To run this script using the DMelt IDE, copy the above URL link to the menu [File]→[Read script from URL] of the DMelt IDE.



"""

Code example

This example shows how to create a matrix and perform a number of operations. Look at the Java matrix documentation """ from Jama import Matrix array = [[1.,2.,3],[1.,2.,3.],[1.,2.,3.]]; a = Matrix(array) b = Matrix([[0.,1.,3],[1.,2.,3.],[3.,2.,5.]]) c=b.times(a) print c.toString() B = Matrix.random(5,5) print B.toString() T = B.transpose() print "Transpose=\n",T.toString() C=B.inverse() print "Inverse=\n",C.toString() C=B.det() print "Determinant=\n",C print dir(B) # show methods

You see the box below because you did not login.