There follows a full list of template definitions.
The display shows where the parameters will be placed in the equations, the parameters being represented by the letters "a", "b", "c", etc. e.g. typing
int{sin ~x, ~x = 0, ~x = &infty., d~x}
in the HTML text, will produce the following to be displayed on the web page:
int{sin ~x,~x = 0,~x = &infty.,d~x} |
i.e. in this example
Compare this with the description of "inf" in the list:
Mathyma template definitions are saved in an XML file. You can view the XML file by clicking on this link.
Templates are ultimately translated by Mathyma into HTML tables. Each <Template> tag will have a <Name> subtag, which is the name used in your HTML source, and a <Descript> subtag giving a short description. The <RowCount> and <ColCount> tags tell Mathyma the number of rows and columns in the HTML table.
The template consists of a number of <Element> tags. Each element corresponds to one cell of the HTML table and has the following properties:
Drawing arrays and matrices on your web page is a doddle with Mathyma.
Only templates with a fixed layout can be defined completely in the template dictionary. Arrays and matrices can have many different dimensions, and it would require a dictionary entry for each one. Instead this type of structure is defined dynamically to accomodate the dimensions implicit in the input parameters.
For the moment lets take arrays as an example. An array is a number of rows each with a number of elements. In Mathyma an array is defined using the array{ } template. The parameters of array{ } represent the contents of the array. The rows are separated by a forward slash or oblique, "/", and each element within a row is separated by a comma. A simple example:
array{a_1 , a_2 , a_3 / b_1 , b_2 , b_3 / c_1 , c_2 , c_3 }
array{a_1 , a_2 , a_3 / b_1 , b_2 , b_3 / c_1 , c_2 , c_3 } |
If some rows are shorter than others, spaces will appear at the end of the row:
array{a_1 , a_2 / b_1 , b_2 , b_3 / c_1 , c_2 }
array{a_1 , a_2 / b_1 , b_2 , b_3 / c_1 , c_2 } |
If you want blank elements within a row, just leave the element out (but retain the comma as a placeholder):
array{a_1 , a_2 , a_3 / , , b_3 , b_4, b_5/ c_1 , c_2 }
array{a_1 , a_2 , a_3 / , , b_3 , b_4, b_5/ c_1 , c_2 } |
From a display point of view, a matrix is just an array within brackets. Use the matrix{ } template to draw a matrix. The parameters are exactly as for array{ }, so here are just a few examples for illustration:
Example 1
B _ _ = _ _ matrix{1,3,-2,8/0,-3,5,6/-2,0,0,4 }
B _ _ = _ _ matrix{1,3,-2,8/0,-3,5,6/-2,0,0,4 } |
Example 2
A _ _ = _ _ matrix{~a_{1,1} , ~a_{1,2}, ~a_{1,3} / ~a_{2,1} , ~a_{2,2}, ~a_{2,3} / ~a_{3,1} , ~a_{3,2}, ~a_{3,3} }
A _ _ = _ _ matrix{~a_{1,1} , ~a_{1,2}, ~a_{1,3} / ~a_{2,1} , ~a_{2,2}, ~a_{2,3} / ~a_{3,1} , ~a_{3,2}, ~a_{3,3} } |
Example 3
I_~n _ _ = _ _ matrix{1,0, ... ,0/0,1, ... , 0/:,:,^.._.,:/0,0, ... ,1}
I_~n _ _ = _ _ matrix{1,0, ... ,0/0,1, ... , 0/:,:,^.._.,:/0,0, ... ,1} |
Example 4
matrix{ 2, -6, 1/ 6, 0, -2} matrix{ 1, 3, -2, 8/ 0, -3, 5, 6/ -2, 0, 0, 4} _ _ = _ _ matrix{ 0, 24, -34, -16/ 10, 18, -12, 40}
matrix{ 2, -6, 1/ 6, 0, -2} matrix{ 1, 3, -2, 8/ 0, -3, 5, 6/ -2, 0, 0, 4} _ _ = _ _ matrix{ 0, 24, -34, -16/ 10, 18, -12, 40} |
This last example will just allow me to plug another Mathyma product. If you're doing a lot of numerical matrix calculations why not have a look at the ? Here's the previous example, but now the computer does all the calculation:
<script type="text/javascript"> cMatrix_Precision = 0; var matA = new cMatrix("2,-6,1/6,0,-2"); var matB = new cMatrix("1,3,-2,8/0,-3,5,6/-2,0,0,4"); document.write(matA.McPrint() + " " + matB.McPrint() + " _ _ = _ _ " + matA.Mult(matB).McPrint() ); </script>
Elegant or what?!
also does matrix addition, inverse, determinants, scalar product and lots more!
A determinant is just a matrix behind bars!
Example 1det{ 2, 3, -1/ 6, 1, -3/ 0, 2, 5} _ _ = _ _ -80
det{ 2, 3, -1/ 6, 1, -3/ 0, 2, 5} _ _ = _ _ -80 |
Oh! Did I mention that also works out determinants?
<script type="text/javascript"> var matC = new cMatrix("2,3,-1/6,1,-3/0,2,5"); document.write("the determinant of _ " + matC.McPrint() + " _ is _ " + matC.Determinant()); </script>
Example 2
det{1,λ_1, ... ,λ_1^{~r - 1}/:,:,,:/1,λ_{~r}, ... ,λ_{~r}^{~r - 1}} _ _ is called #~{Vander Monde's Determinant}.
det{1,λ_1, ... ,λ_1^{~r - 1}/:,:,,:/1,λ_{~r}, ... ,λ_{~r}^{~r - 1}} _ _ is called #~{Van der Monde's Determinant}. |