Enter two matrices and get a resulting answer....
Code:
The elements of the multiplication are stored in LIST3
Now time to sort it in to a matrix....
Code:
I know that it would be simply [A]*[B], but since European History was too easy and boring, i figured that it might be possible to replicate two matrices being multiplied together....
Please optimize this code b/c I got way over my head over this.... (If possible...)
Code:
Prompt [A],[B]
dim([A]->LIST1:dim([B]->LIST2
Delvar LIST31->C:Ans->A //Delvar LIST3:1->C
For(Z,1,LIST(1
1->B
Seq([A](A,X),X,1,LIST1(2->LIST4
For(Y,1,LIST(2
Seq([B](X,B),X,1,LIST2(1->LIST5
Sum(LIST4LIST5->LIST3(C //Sum(LIST4*LIST5->LIST3(C
B+1->B:C+1->C
End:A+1->A:End
The elements of the multiplication are stored in LIST3
Now time to sort it in to a matrix....
Code:
1->A
{LIST1(1),LIST2(2->dim([C]
For(Z,1,LIST1(1
For(Y,1,LIST2(2
LIST3(A->[C](Z,Y
A+1->A
End:End
Pause [C]->Frac
I know that it would be simply [A]*[B], but since European History was too easy and boring, i figured that it might be possible to replicate two matrices being multiplied together....
Please optimize this code b/c I got way over my head over this.... (If possible...)