File Exchange

image thumbnail

Unique Columns Certain Rows

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

0 Downloads

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
true
false ]
tol=1

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

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

indexVector=[1,1,2,3]

Cite As

Claudio Delpino (2021). Unique Columns Certain Rows (https://www.mathworks.com/matlabcentral/fileexchange/55217-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!