remove rows in table based on criteria across two columns
Ältere Kommentare anzeigen
How do I remove rows based on whether or not a substring in one column matches with a number in a second column according to a pre-defined criteria?
The criteria;
80ms,140ms & 1
100ms,250ms & 2
250ms,600ms & 3
600ms,900ms & 4
An example of the data below. I want to delete the rows below where 250ms,600ms is in the first column and the number in the second column is a number other than 3, and delete rows where 100ms,250ms is in the first column and a number other than 2 is in the second column.
'CG_11_21_250ms,600ms_CPR' 1
'CG_11_21_250ms,600ms_CPR' 2
'CG_11_21_250ms,600ms_CPR' 3
'CG_11_21_250ms,600ms_CPR' 4
'CG_12_22_100ms,250ms_FCL' 1
'CG_12_22_100ms,250ms_FCL' 2
'CG_12_22_100ms,250ms_FCL' 3
'CG_12_22_100ms,250ms_FCL' 4
Akzeptierte Antwort
Weitere Antworten (1)
DavidL88
am 3 Nov. 2021
0 Stimmen
3 Kommentare
Turlough Hughes
am 3 Nov. 2021
Can you attach a .mat file with a representative Table inside?
Also, in future, please use the comments section underneath an answer when responding to it as opposed to creating a new answer.
DavidL88
am 3 Nov. 2021
Turlough Hughes
am 3 Nov. 2021
I've edited my answer above.
Kategorien
Mehr zu Tables finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!