필터 지우기
필터 지우기

Search for number in table column

조회 수: 6 (최근 30일)
Chinedu Okoye
Chinedu Okoye 2020년 8월 24일
답변: SAA 2020년 8월 25일
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?

답변 (1개)

SAA
SAA 2020년 8월 25일
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
............

카테고리

Help CenterFile Exchange에서 Cell Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by