Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Help with Looping through multiple Images' topicStudent Support Forum > General > Archives > "Help with Looping through multiple Images"

Next Comment >Help | Reply To Topic
Author Comment/Response
Buff
09/11/08 08:19am

Hi, I've just started using Mathematica, so my question might be easy to solve, but I'm having a problem with a For Loop and Importing graphics within this loop.

Basically I have an Image Sequence of bmp's of which I want to open. My current code is...

For[i = 0, i < 3, i++,
   name = "n00";
   name = name <> IntegerString[i];
   name = name <> ".bmp";
   Import[name, "Graphics"]
   Print[name];
]

The only output I get from this is the output string I get from the Print Command.
i.e.

n000.bmp
n001.bmp
n002.bmp

With the actual Images not opening.

However if I remove the loop and hard code the value i, the output is correct, I get the displayed image and the output string.

Does anyone have any ideas of what I'm doing incorrectly?


URL: ,

Subject (listing for 'Help with Looping through multiple Images')
Author Date Posted
Help with Looping through multiple Images Buff 09/11/08 08:19am
Re: Help with Looping through multiple Images yehuda ben-s... 09/11/08 5:23pm
Re: Help with Looping through multiple Images Xavier 09/12/08 06:45am
Next Comment >Help | Reply To Topic