Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: [mg6112] Re: [mg6100] Complement
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  

Posts: 451
Registered: 12/7/04
[mg6112] Re: [mg6100] Complement
Posted: Feb 22, 1997 11:52 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Houshou Chen wrote:
> The result of Complement always resort the order, Is there any code such
> that taking the complement without changing the original order?
> Complement[{5,4,3,2,1},{1,2}] is {3, 4, 5}, I would like the result to be
> {5,4,3} instead.
> Houshou

Look in the mathematica book under the Sort command. You can change the
default sort function. The other option is to use the Position command
and the various array manipulation commands to re-sort the array.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2015. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.