Filtering rows of a table by giving a constraint to a particular column

3 ビュー (過去 30 日間)
Jasraj Soni
Jasraj Soni 2019 年 10 月 17 日
コメント済み: Jasraj Soni 2019 年 10 月 17 日
I have a table lets say, A with 100 rows and 200 columns,
column 150 is 'Alpha',
Now I want to filter this table by applying a contraint to Alpha, lets say Alpha > 100
so my code for filtering is :
Filtereddata = A(A.Alpha > 100);
It shows this error: Subscripting a table using linear indexing (one subscript) or multidimensional indexing (three or more
subscripts) is not supported. Use a row subscript and a variable subscript.
So do I have to use for loop for this, or is there any other method to solve the issue.
Your help is much appreciated.
Thank you.

採用された回答

Andrei Bobrov
Andrei Bobrov 2019 年 10 月 17 日
FiltereddataofTable = A(A.Alpha > 100,:);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStatistics and Linear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by