I'd like to see all the MAT statements and functions of ISO BASIC (INV, DET, TRN, IDN, MAT READ, MAT PRINT, etc.) Matrix manipulation makes graphics translations and rotations so much easier and, potentially faster.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
TRN is the transpose of a matrix, flipping rows and columns. I couldn't find a description of TRANS in the manual except for the first reference. Is transverse the same as transpose?
1 2 3 1 4 7
4 5 6 ===> 2 5 8
7 8 9 3 6 9
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
TRANS should do the TRN thing. ITN is already implemented:
a()=1(4)
Maybe the sytax looks really strange, but it works.
So what is really missing is MAT PRINT.
MAT READ is also missing, but you can easily define Array constants like
a()=[1,2,3,4;5,6,7,8;9,0,1,2;3,4,5,6]
An implementation of MAT READ would be simple. I would call the new command "MATREAD" without the space. Maybe this would not even be necesaary, because an extension of the normal READ command will do:
READ a()
Same for PRINT:
PRINT a()
But how should the oputput look like?
(depending on the dimension of the array)
What about PRINT a() USING "##.##"
maybe too difficult to implement.....
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd like to see all the MAT statements and functions of ISO BASIC (INV, DET, TRN, IDN, MAT READ, MAT PRINT, etc.) Matrix manipulation makes graphics translations and rotations so much easier and, potentially faster.
Well, OK, lets make them work.
There is a DET, INV, TRANS already. What is TRN, IDN supposed to do?
Note that X11-Basic uses them as Functions for arrays, instead of MAT-commands.
IDN creates an identity matrix
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
TRN is the transpose of a matrix, flipping rows and columns. I couldn't find a description of TRANS in the manual except for the first reference. Is transverse the same as transpose?
1 2 3 1 4 7
4 5 6 ===> 2 5 8
7 8 9 3 6 9
TRANS should do the TRN thing. ITN is already implemented:
a()=1(4)
Maybe the sytax looks really strange, but it works.
So what is really missing is MAT PRINT.
MAT READ is also missing, but you can easily define Array constants like
a()=[1,2,3,4;5,6,7,8;9,0,1,2;3,4,5,6]
An implementation of MAT READ would be simple. I would call the new command "MATREAD" without the space. Maybe this would not even be necesaary, because an extension of the normal READ command will do:
READ a()
Same for PRINT:
PRINT a()
But how should the oputput look like?
(depending on the dimension of the array)
What about PRINT a() USING "##.##"
maybe too difficult to implement.....