[xLIB] Help with matricies.
Moderator: MaxCoderz Staff
[xLIB] Help with matricies.
Ok, I read through the readme and I understand how to use the commands that xLib lets you use. The only thing I don't understand is how to make the matricies. I looked at the MAP1 program that draws the matricies for the example program, but it just looks like a bunch of numbers to me. Could someone help me, or point me in the direction of someone who can? Thanks.
For matrics:
such as I want a 3 to be in the 1,1 position then I would 3->[A](1,1
Btw tr1p, you might want to move this to the help section.
So you just want to change a number, then just [A](A,BBASIC Code wrote::ClrHome
:[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1[A]
:For(A,1,8
:For(B,1,16
:Output(A,B,sub(" O",[A](A,B)+1,1
:End
:End
:2A:2B
:[A](A,B
:Repeat Ans=1
:Repeat Ans
:getKey
:End
:AC:BD
:B+(=26)-(=24B
:A+(=34)-(=25A
:If [A](A,B:Then
:CA:DB:End
:Output(C,D,"
:Output(A,B,"O
such as I want a 3 to be in the 1,1 position then I would 3->[A](1,1
Btw tr1p, you might want to move this to the help section.
A matrix is a way to store numbers in a 2 dimensional way. So instead of having an index, like in a list, you'd have two coordinates to point to a value. This is an example of a matrix:
Code: Select all
3 6 1 9 6 4
3 8 3 7 3 5
8 2 9 1 3 4
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS