Mathematica 9 is now available
Student Support Forum
Student Support Forum: 'Programming' topicStudent Support Forum > General > "Programming"

Next Comment >Help | Reply To Topic
Author Comment/Response
10/31/99 8:25pm

I am trying to find a way in which i can create an image. This is what I want to do: I want to create an image that is for example, made up of the number one and zero. It may look something lke this:

image={{0 0 0 0 0 0},
{0 0 1 1 0 0},
{0 0 1 1 0 0},
{0 0 0 0 0 0}}

Nw in this image, I inserted the numbers manually. I want to know, is there an easier way i can do that, meaning not having to insert the numbers in manually. For example, if i want 200 1's and 400 0's, is there a command i can use to just give it the number of ones and zero's i want and it will create the image for me?

URL: ,

Subject (listing for 'Programming')
Author Date Posted
Programming Fabid 10/31/99 8:25pm
Re: Programming Fabrice P. L... 11/13/99 07:11am
Next Comment >Help | Reply To Topic