I want to filter values from a data matrix
Show older comments
I have a datamatrix with the following contents:
Rownames Cond1 Cond1 Cond1 Pvals
a 15 23 21 .055
a 45 1 58 .001
b 8 98 56 .02
c 6 89 45 .004
d 9 55 15 .008
c 45 68 95 .04
I want to filter this matrix to have a matrix like below. The idea is that for any two or more similar row names, i want to remain with the one with the lowest Pvals.
Rownames Cond1 Cond1 Cond1 Pvals
a 45 1 58 .001
b 8 98 56 .02
c 6 89 45 .004
d 9 55 15 .008
4 Comments
Luna
on 17 Dec 2018
Is your data matrix is a table or a cell array? Please share the code what have you done so far?
Ronald Odongo
on 17 Dec 2018
Edited: madhan ravi
on 17 Dec 2018
Ronald Odongo
on 17 Dec 2018
Luna
on 17 Dec 2018
Unfortunately I have never worked on data matrix objects before but the idea of the algorithm may help you below answer.
Accepted Answer
More Answers (0)
Categories
Find more on Expression Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!