How to extract a data from a table using a string stored in a variable
21 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Gabriela Canto Encalada
el 5 de En. de 2022
Respondida: Cris LaPierre
el 5 de En. de 2022
I have a table T with a column called 'Rules_updated'. The extraction is as simple as write
T.Rules_updated
However, in other cases the column could be called 'RulesUpdated'.
I want to save the name as a variable and use the new variable to extract the data from the column. For example:
RulesUpdatedColumn='Rules_updated';
RulesUpdated=T.RulesUpdatedColumn;
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Tables en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!