Delete rows in a table where data in one column is below a value
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
DavidL88
el 20 de En. de 2021
Comentada: DavidL88
el 20 de En. de 2021
Hi
I have a table with four columns and multiple rows of data. I want to delet all rows where the value of teh data in the 4th columns is less than 0.1. Can anyone advise how to do this?
I tried this code to keep those rows where the data was >=0.1 but got the below message. Tis the table with all the data and Tmain is the new inteneded table without the those rows where data is <0.1 in 4th column.
T = table(T4, T1, T2, T3)
Tmain = T(T(:,4)>=0.1,:)
Operator '>=' is not supported for operands of type 'table'.
Error in working_file_2 (line 31)
Tmain = T(T(:,4)>=0.1,:)
0 comentarios
Respuesta aceptada
Adam Danz
el 20 de En. de 2021
> I want to delet all rows where the value of the data in the 4th columns is less than 0.1.
T(T{:,4}<0.1,:) = [];
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!