No BSD License  

Highlights from
setdiff

Be the first to rate this file! 2 Downloads (last 30 days) File Size: 426 Bytes File ID: #23172

setdiff

by Nick

 

04 Mar 2009

Set difference of two sets of positive integers (much faster than built-in setdiff)

| Watch this File

File Information
Description

Set difference of two sets of positive integers (much faster than built-in setdiff) which is great if you have to call it million times in a loop.

MATLAB release MATLAB 5.3 (R11)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
03 Sep 2009 Ben Petschel

Neat idea. How does the speed compare when you use sparse and/or logical arrays, e.g. to do setdiff([1,1e9],1) ?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
finance Nick 04 Mar 2009 14:40:21
mathematics Nick 04 Mar 2009 14:40:21
optimization Nick 04 Mar 2009 14:40:21
statistics Nick 04 Mar 2009 14:40:21

Contact us at files@mathworks.com