Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How do I ask Maple to skip an integer in a loop? Something like:

for i from 0 to n do

for j from 0 to n, j<>i, do ...

(I want j to skip i.)

share|improve this question

closed as off topic by Sasha, sdcvvc, Old John, Michael Greinecker, Jesse Madnick Aug 30 '12 at 4:57

Questions on Mathematics Stack Exchange are expected to relate to math within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

add comment

1 Answer 1

up vote 2 down vote accepted

Well you can always use an if statement:

for i from 0 by 1 to n do
 for j from 0 by 1 to n do
 if i <> j then {} end if 
 end do 
end do
share|improve this answer
    
Perhaps there is a simpler way? –  TCL May 31 '12 at 22:20
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.