Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Skip an iteration in Table' topicStudent Support Forum > General > Archives > "Skip an iteration in Table"

Next Comment >Help | Reply To Topic
Author Comment/Response
Ameya Sathe
05/08/12 07:02am

Hello,

Is there a way to skip an iteration using Table function? Say, I have the following code,

Table[If[i<3,Continue[]];Print[i];,{i,5}];

This code gives errors because Continue[] can only be used in Do, For and While loops, but my desired output is
3
4
5

Thus I wish to skip the iteration loop when i=1 and i=2. I also do not wish to use Do, For and While loops because the above example that I have given is very simple, and I wish to know this for a more complicated code that I have.

Thanks and Regards,
Ameya

URL: ,

Subject (listing for 'Skip an iteration in Table')
Author Date Posted
Skip an iteration in Table Ameya Sathe 05/08/12 07:02am
Re: Skip an iteration in Table toen 05/11/12 10:50pm
Re: Re: Skip an iteration in Table Ameya 05/14/12 01:44am
Re: Re: Re: Skip an iteration in Table toen 05/14/12 11:10am
Re: Re: Re: Re: Skip an iteration in Table Ameya 05/16/12 01:34am
Next Comment >Help | Reply To Topic