Borrar filtros
Borrar filtros

Search for number in table column

5 visualizaciones (últimos 30 días)
Chinedu Okoye
Chinedu Okoye el 24 de Ag. de 2020
Respondida: SAA el 25 de Ag. de 2020
I have created an app in Matlab app designer where I am populating a table with values read in from a text file using readtable. I am trying to search one specific column of the table for a value greater then a selected number using an if statement, and if there is a number greater than this number the if statement would execute. What would be the best way to implement this?

Respuestas (1)

SAA
SAA el 25 de Ag. de 2020
since you're working with numbers I think something like this should work:
% your thing....
for i = 1:height(YourTable)
if table2array(a(i,YourColumnNumber)) > TheNumber
% Do your thing
end
end
............

Categorías

Más información sobre Cell Arrays 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!

Translated by