extract data based on specific condition
Mostrar comentarios más antiguos
Hello,
Can someone help me. i am newbie in looping and conditioning things in programming. I had some problem in getting the data based on specific criteria or condition. For example i have 2 set of data which i call set1 and set2 which each data consists of multiple row and 4 column. For full set of data, the total number of rows for both 2 set are different and the total number is not cosistent between both but have the same total number of column which is 4. For example, i show some of my 2 set data.
set1:
58202.0003472222 10 12 -0.00419000000000000
58202.0003472222 12 14 0.00259000000000000
58202.0003472222 14 20 0.00437000000000000
58202.0003472222 20 21 -0.00745000000000000
58202.0003472222 21 24 -0.00101000000000000
58202.0003472222 24 25 -0.000761000000000000
58202.0003472222 25 26 0.00243000000000000
58202.0003472222 26 29 -0.00121000000000000
58202.0003472222 29 32 0.00169000000000000
58202.0006944445 10 12 -0.00427000000000000
set2:
58202.0003472222 10 12 -0.00136000000000000
58202.0003472222 12 14 0.000256000000000000
58202.0003472222 14 20 -0.000641000000000000
58202.0003472222 20 21 0.00136000000000000
58202.0003472222 21 24 -0.000655000000000000
58202.0003472222 24 25 -8.90000000000000e-05
58202.0003472222 25 29 7.69000000000000e-05
58202.0003472222 29 31 1.86000000000000e-06
58202.0003472222 31 32 -0.00101000000000000
what i want to do is i wanna take the forth (4) column for both set of data and set it as variable example a for set1 and b for set2 with a condition that the column 1, column 2, and column 3 is the same or equal.
2 comentarios
Sriram Tadavarty
el 5 de En. de 2021
It would be good to indicate how the desired output should be for the provided sets, set 1 and set 2.
Nazrin Afiq Abdul Rahman
el 5 de En. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!