Creating a new table from values in a table that meet a condition
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Josh Beaumont
el 9 de Mzo. de 2021
Comentada: Cris LaPierre
el 10 de Mzo. de 2021
Hello,
I currently have a table with different variables. I would like to create a new table from the values in which meet a condition.
For example, there is a table of test scores from a set of students and I want to create a new table with student name and score displayed of those students that scored above a certain mark and discards those that scored below.
How would I go about doing this?
Thanks for your help
0 comentarios
Respuesta aceptada
Cris LaPierre
el 9 de Mzo. de 2021
If you are actually working with a table and not a matrix, you may find this page helpful as well. The first column indicates what the output datatype will be.
2 comentarios
Cris LaPierre
el 10 de Mzo. de 2021
Of course, but how are you doing your filtering?
I would suggest creating an index for the values you want to keep, then use the linked page to create a table that is a subset of the original table. My answer here may help. It this situation, the data was filtered to only keep a specific time each day.
Más respuestas (0)
Ver también
Categorías
Más información sobre Downloads en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!