To run this, you need ianm matrix utils 32, for the "set matrix" command.
`%Project Title%
`%Source File Name%
`======================
null=make matrix4(1)
null=make matrix4(2)
set matrix4 1,2,0,2,1,1,2,3,4,2,6,1,7,1,2,6,4
set matrix4 2,1,6,2,6,3,7,9,3,3,5,7,1,4,3,7,3
`[2,0,2,1] [1,6,2,6]
`[1,2,3,4] [3,7,9,3]
`[2,6,1,7]x[3,5,7,1]
`[1,2,6,4] [4,3,7,3]
n=10
n=n+printM4(1,n,100,0)+5
text n,129,"X"
n=n+text width("X")+5
n=n+printM4(2,n,100,0)+5
text n,129,"!="
n=n+text width("!=")+5
multiply matrix4 2,1,2
printM4(2,n,100,0)
wait key
end
function printM4(m4, x,y,decimals)
line x,y,x+10,y
line x,y,x,y+74
line x,y+74,x+10,y+74
dim s(3) as String
s(0)=""
s(1)=""
s(2)=""
s(3)=""
tw as integer
for y2=0 to 3
for x2=0 to 3
s(y2)=s(y2)+str$(M4Element(m4,y2,x2),decimals)
if x2<3 then s(y2)=s(y2)+" "
next x2
n=text width(s(y2))
if tw<n then tw=n
next y2
tw=tw+10
line x+tw,y,x+tw-10,y
line x+tw,y,x+tw,y+74
line x+tw,y+74,x+tw-10,y+74
for l=0 to 3
text x+5,y+5+16*l,s(l)
next l
endfunction tw
function M4Element(m4,row,column)
n#=get matrix4 element(m4,column+row*4)
endfunction n#
prints a matrix4 and returns the width of the matrix4 in pixels. Use 0 decimal places if your matrix consists of only whole numbers.