Data Filtering Help Needed?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Minjun Seo
el 11 de Ag. de 2019
Comentada: Minjun Seo
el 11 de Ag. de 2019
Hi I have a data table that I loaded through the workspace.
I saved this table into a variable, let's say x.
Now in one specific column, it says Y for a yes and blank for a no.
How can I cut out the rows that have a blank space in that column?
0 comentarios
Respuesta aceptada
Image Analyst
el 11 de Ag. de 2019
Try something like this:
col = 2; % Whatever it is...
theColumn = x{:, col}; % Extract column 2 as a cell array from the table.
rowsToDelete = contains(theColumn, ' ');
x(rowsToDelete, :) = []; % Delete all rows where a space was in col 2
If that doesn't work, attach x in a .mat array:
save('answers.mat', 'x');
and attach it with the paper clip icon.
Más respuestas (0)
Ver también
Categorías
Más información sobre Tables 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!