File Exchange

image thumbnail

Unsorted Set Operations

version 1.1.0.0 (2.09 KB) by Don Vaughn
Unsorted versions of setdiff, intersect, union, and setdiff

1 Download

Updated 20 Apr 2011

View Version History

View License

There have been lots of cases where I'll want to look, in a specific order, at subjects in a larger set. Setdiff Intersect and Union are the exact operations I want, but unsorted. I coded up Unique just for good measure.

These are relatively rough m-files, w/ little or no help functions, but they're very simple and identical to the built-in Matlab functions, just without sorting.

I changed the 2nd and 3rd outputs of union to actually be useful.

Enjoy and if you'd like any changes, leave a comment and I'll implement them.

best,
Don Vaughn

Cite As

Don Vaughn (2021). Unsorted Set Operations (https://www.mathworks.com/matlabcentral/fileexchange/30854-unsorted-set-operations), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (1)

Lauren Biermann

Works like a charm, thanks DV!

MATLAB Release Compatibility
Created with R14
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!