'=========================================================================== ' Subject: MATRIX MANIPULATION ROUTINES Date: 03-31-99 (00:40) ' Author: Nigel Traves Code: QB, QBasic, PDS ' Origin: tarot@ihalliwell.freeserve.co.u Packet: ALGOR.ABC '=========================================================================== ' Matrix Operation routines DEFINT A-Z:DIM SHARED K,S,B&,Z&:V1 'Created by PostIt! 7.2 SUB V1:OPEN "O",1,"MATRIX.ZIP",4^6:Z&=6189:?STRING$(50,177); U"%up()%9%'%[-%B.fdGjC%Qw80#%%WG%%%.%%%%rf#ywn'[Sgnfhk*>Tm];#X(,g U"TUmtI1^-m[=r=M66k/B U"7avvzKro.*0a*x%$?8ws0uQxCTfWWNPZouvVW0>:pY&WoU7cU:'l'T]XE7l[>Wt U"8\u,rw%??7+/L-rr_1S%FjLR?Kv-o*:n9AHWu[4WCJ U"#:2j#FaU*-W9&+dAk84ELhb\KaoqmROLUprH=Ah1VQQ]v/QBfk+Ym>LIaoIk8Gg U"pNL=.HX4NR\#W=FkLfcC^WRlEbyV7vIHiOh96fdeZ:&7ML-8g%BxBTwaHWE6Kdr U"+xE2D[GqJ,rtayY-hlZNR1ABL&enu6YKtat1JoknrorYUJg5G$r9)m9#Jtoh.O& U"H7B)+0NbvjZZr^#n>D)Xv:eOqP^KIFDN*w46%3I1CUjH*g08$P<$t+M:6n+uC*n U"b./X5Ud-)tHfHuR\GGA&?+O;M#aK&avJM/GyZtj,?rcsl7PoJd2i[BMpC2cGS=H U"WGG9bk6?z*QenKC9w/u+oGlsh;?>.E2M(YkE6[G8rS=ytbh+0Qqs9iQ8Mrp+3k87btt^k5b'GZ6_q.y] U".3XUMK#ZE#dX['-^Cve)Hee:ZDBU.[;5&.4(+XeI4pD5g%Dj:?_ U"pnuh3g5hf0I0sZ#L.7XSrK$g=JU&i#/8'r>i5_fXm$gdnW9P(d^M39&/#0=enLS U"B$ccE;adA'-Gd=OV'f_r5BYMSpgAb&*9%lklBcrMQlJe0-I(2\JD+7OYlh='h'7 U"CjSq<%$EQErQKe'i8_7p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