transpower Posted August 8, 2004 Posted August 8, 2004 I request that FileMaker add a matrix field type so that matrices can be entered and matrix mathematics performed (with new functions). I also request a contains operator and field event trapping. Also, FileMaker should work with Microsoft to use protected memory so that if FileMaker freezes it wouldn't freeze the whole darn machine.
Ender Posted August 8, 2004 Posted August 8, 2004 It's been a while since I've worked with matricies. A matrix is essentially a multi-dimensional array, correct? Can you give examples of what you would want to see.
transpower Posted August 8, 2004 Author Posted August 8, 2004 OK. I'd like one and two-dimensional arrays (I don't think that three-dimensional or higher-dimensional arrays would usually be needed). I'd like to be able to multiply matrix A and vector x and add that to the product of matrix B and vector u, for instance. So, I'd like matrix addition, subtraction, multiplication, powers, inverses, transposes, and also have functions that can work with each element of an array.
Fenton Posted August 8, 2004 Posted August 8, 2004 If you can get your hands on a Mac, this is available using AppleScript, via a free Scripting Addition, Satimage, from: http://www.satimage-software.com They are into mathematics and graphics. Maybe someone will create a FileMaker plug-in that does this; I've never heard of one. Maybe Visual Basic? (I have no idea) Here's a some of its dictionary: creatematrix plain text -- "1": array of 1.0, "x": array of x values, "y": array of y values ncols integer -- or a list of real with the "x" option, will make an array with identical rows nrows integer -- or a list of real with the "y" option, will make an array with identical columns [range a list of real] -- {min,max} [as type class] -- array of real or matrix, default: array of real Result: array of real -- or matrix transpose matrix -- the matrix Result: matrix -- the transposed matrix extractarray array of real [at integer] -- the first item to read or a list of indexes (in which case, the "for", "step" and "blocksize" parameters are not taken into account). 1-based. Default 1 [for integer] -- the number of blocks to read. Default 1 [blocksize integer] -- size of the block to read at each step. blocksize must be smaller than step [step integer] -- the interval between the beginnings of successive blocks to read. Must be larger than blocksize. Default: blocksize [as type class] -- default is array of real, you can provide small real or real for 1 item Result: array of real evalformula: apply C-like mathematical expressions to arrays of real. Ex: evalformula "a*x^2+y^2" with {a:2.4,x:anarray,y:anotherarray} evalformula plain text -- the formula to compute [with a list of real] -- the definition of the variables occurring in the formula. Result: array of real -- or real
RalphL Posted August 9, 2004 Posted August 9, 2004 I would like to know why and how you would use a matrix in a database. It seems counter to the first normal form of relational database design.
transpower Posted August 9, 2004 Author Posted August 9, 2004 Fenton: Thanks, but I work with Windows and UNIX only. I do a lot of matrix programming using MATLAB, Maple, and Mathcad. (I used to use TrueBASIC quite a lot--it had all kinds of matrix manipulations.) It would be nice to be able to do it in FileMaker. Ralph: The matrix field type would be just another field type; a calculation involving matrices would be another matrix.
The Shadow Posted August 9, 2004 Posted August 9, 2004 I can't see matrices ever being added as a field type, I think its too technical. I added an example to my web page that does some of the easier matrix manipulation as custom functions: http://www.spf-15.com/fmExamples/ (see Matrix Math) The matrices are stored as a semi-colon seperated list, ie: -1; 3.5; 17; 0; 14; 72; It implements transpose, matrix multiplication with another matrix or a scalar, addition / subtraction of matrices, an identity matrix creator, and various functions to extract rows, columns, or a single element. No determinant or inverse functions at the moment, those look quite a bit more complex.
transpower Posted August 9, 2004 Author Posted August 9, 2004 The Shadow: Very good--it makes sense to use custom functions for this.
transpower Posted August 14, 2004 Author Posted August 14, 2004 The Shadow: I finally got around to testing your custom functions. Unfortunately the matrix multiplication routine doesn't work. If I multiply [1 0 5 ; -1 3 2] by [3 3 ; 2 1 ; 1 0] (MATLAB notation) I should get [8 3 ; 5 0]. Your custom function returns [3 3 ; 5 0].
The Shadow Posted August 14, 2004 Posted August 14, 2004 I'm not seeing that problem. I added a new record with: MatrixMultiply( A; B ) with A: "1; 0; 5;
The Shadow Posted August 14, 2004 Posted August 14, 2004 I have updated the example on my website to incorporate a few fixes to some of the routines that were leaving extra elements around in some cases. I also changed records to be examples, with short descriptions of the public functions. http://www.spf-15.com/fmExamples/
transpower Posted August 14, 2004 Author Posted August 14, 2004 The Shadow: I've tried several different matrix multiplicands; the custom function gives the wrong 1,1 element in each case.
transpower Posted August 14, 2004 Author Posted August 14, 2004 OOPS: When I was playing with the A or B matrix I was inadvertently leaving off the ";" at the end of the first row (out of habit in working with other computer languages like MATLAB and Maple). With the ";" in place at the end of each row and between each element, your custom function produces the correct result. Thank you very much.
bruceR Posted August 23, 2004 Posted August 23, 2004 If you're working with Unix then of course the Mac is a perfect fit because it Is Unix. The Satimage capabailities are amazing.
Recommended Posts
This topic is 7465 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now