Re: Need help combining 2 sequences
- Posted by EUWX Aug 28, 2012
- 1242 views
Lnettnay said...
I have 2 sequences such as this:
voters = {{82,68,82,68,82},{82,68,68,68,82},{82,68,68,68,68}} colors = {{23,71,23,71,23},{23,71,71,71,23},{23,71,71,71,71}}
and I would like to combine them into 1 sequence like this
image = {{82,23,68,71,82,23,68,71,82,23},{82,23,68,71,68,71,68,71,82,23},{82,23,68,71,68,71,68,71,68,71}}
so that I can use
display_text_image({1,1}, image)
to display the image quickly.
I would like to do this without having to resort to a nested for loop but I can't find any sequence routine that will do what I want. I might not be understanding the supplied sequence routines.
TIA,
Lonny
-- If your two sequences are raw data in the program, -- it would be most appropriate to have them as voters = {{82,0,68, 0,82, 0,68, 0,82,0},{82, 0,68, 0,68, 0,68, 0,82, 0},{82, 0,68, 0,68, 0,68, 0,68, 0}} colors = {{0,23, 0,71, 0,23, 0,71, 0,23,},{ 0,23, 0,71, 0,71, 0,71, 0,23},{0,23, 0,71, 0,71, 0,71, 0,71}} -- Even if the sequences are program generated, you could interpose -- the zeros in the program that generates the sequences. -- Then an addition of the sequences would give you your required sequence.