File Exchange

image thumbnail

Unique Columns Certain Rows

version (1.46 KB) by Claudio Delpino
Get the "Unique Columns" of a double matrix, with regard to certain rows and tolerance


Updated 02 Feb 2016

View License

Unique Columns Certain Rows is a (very) small function set, which given a double matrix A forms a second matrix B containing the columns of A which have the same value (below a tolerance) in a set of rows specified by a logical vector. Additionally, it outputs a vector which has the "category" to which each column of A belongs.
PS: Current version doesn't guarantee anything about the elements in the "non determinant" rows of A. B will contain those corresponding to the last tested column.

Graphical example:

A= [ 1 1 2 3
2 1 1 1
4 4 4 3
5 6 6 6 ]

whichRows= [ true
false ]

[B,indexVector]=uniqueColumnsCertainRows(A,whichRows,tol) =>

B= [ 1 2 3
1 1 1
4 4 3
6 6 6 ]


Cite As

Claudio Delpino (2021). Unique Columns Certain Rows (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)

MATLAB Release Compatibility
Created with R2014a
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!