Re: A85: Matrices


[Prev][Next][Index][Thread]

Re: A85: Matrices



I need a beter description than that, I have never used matrices, so I
don't know how i would laod the board or anything!  Sorry I don't know
this stuff.  Also, how would I get it to read it?

John

> a common problem, the maxtrix is two dimensions, but your data is one
> dimension. easy solution
> 
> result = (y-1) * max_x + X
> 
> so basically if you had an array like this:
> 
> 1 2 3 4 5 6 7 8
> 9 0 1 2 3 4 5 6
> 7 8 9 0 1 2 3 4
> 5 6 7 8 9 0 1 2
> 
> (aka .db 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1,
> 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2)
> 
> and you wanted to find the item in (2,3) it would be the (3-1) * 8 + 2
> item (the 18th .db)


References: