B4A Library Matrix Operations Library

The MatrixOp library helps in performing mathematical operations on vectors and matrices (arrays of one or two dimensions).
There is a demo program which can actually be used as an application. It is working on 480*800 (160) and 800*1280 (160) displays, other types of devices may need textsize adaptations.
Short operation manual:
There are 3 matrices of 9x9 max named A,B,C, selection to create, view or load from csv file by RadioButtons.
To create a matrix input rows and cols in the top right edittexts and push "create" and "view", then fill in the data. "Control" loads it to the actual matrix.
Reading a csv file -( it should be in sdcard/Matrix folder) - the first row of headers is ignored (to keep the same files I used in B4PPC ).
The "Control" button shows the menu of buttons to select the required operation.
The K Edittext is for input of Scalar or Rounding integer, or for display of single number results (like determinant).
Please report any problems.
 

Attachments

  • MatrixOp.zip
    325.8 KB · Views: 909
Last edited:

mercon

Member
Hi, on the matrix above, I think 1 or more file is corrupt and it can't be played on my B4A
hope you can reupload or send to me via email, thanks :)
 

derez

Expert
Licensed User
Longtime User
I rechecked the files and they are ok.
Please describe your exact problem.
The two MatrixOp files should be put in your "additional Libraries" folder.
Have you created a directory for the csv files ?
it should be in sdcard/Matrix folder
 
Last edited:

cmastran

Member
Licensed User
Longtime User
Thanks for this library, but I have found an error in it. If I try to do something like:

A = A*B

I get an incorrect result. Instead I need to do:

C = A*B
copy(C, A)

I am guessing that the matrix function doesn't do operations on a temp matrix first and it corrupts itself while doing the calculations.
 
Top