Compare values in two matrix with different length by time in first row
Afficher commentaires plus anciens
Hello,
I have one aim to do comparison of values in two matrices without using for loops (array are huge).
I show you example with two small arrays:
Matrix_R =
9 x 2 double
[time value]
0.020 77
0.030 98
0.040 79
0.070 95
0.080 96
0.090 99
0.100 100
0.100 200
0.120 44
Matrix_G =
13 x 2 double
[time value]
0.010 75
0.020 75
0.030 75
0.040 77
0.050 78
0.060 96
0.070 99
0.080 100
0.090 100
0.100 110
0.110 100
0.120 100
0.130 110
Matrix_R (measure) has not homogenous time values
Matrix_G (ground truth) has homogenous time values
I want compare values between two matrices (with tolerance) from second column by same time. Comparison should be work in both directions.
Example (value tolerance 10):
at time 0.010 in Matrix_G is value 75, in Matrix_R there are no value -> False negative
at time 0.020 in Matrix_G is value 75, in Matrix_R is value 77 -> True positive
at time 0.030 in Matrix_G is value 75, in Matrix_R is value 98 -> False negative and False positive
Question:
- Can I use ismembertool by matrix with different lengths?
- Maybe it makes sense to change time rows of Matrix_R to homogenous and take 0 like values?
Matrix_R_mod =
9 x 2 double
[time value]
0.010 0
0.020 77
0.030 98
0.040 79
0.050 0
0.060 0
0.070 95
0.080 96
0.090 99
0.100 100
0.100 200
0.110 0
0.120 44
what can I make with double answers of time?
I will be happy to hear some ideas from you! Thank you!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!