Create a random matrix containing 1’s, 2’s and 3’s. Display the matrix using the image

command, with

1=red, 2=green and 3=blue.

Printable View

- Oct 8th 2012, 10:55 AMallstar2I need to make an image from a matrix with these colors.
Create a random matrix containing 1’s, 2’s and 3’s. Display the matrix using the image

command, with

1=red, 2=green and 3=blue.

- Oct 8th 2012, 11:12 AMHallsofIvyRe: I need to make an image from a matrix with these colors.
What is your difficulty? Do you know what a "matrix" is? If so "Create a random matrix containing 1’s, 2’s and 3’s" should be easy. To ". Display the matrix using the image command" sounds like you are using some kind of computer algebra system and I have no idea what commands it has. But I suspect you would just replace a bit in an n by n array with the color from the corresponding part of the matrix array.