Highest row number in a table

13 ビュー (過去 30 日間)
Robert Demyanovich
Robert Demyanovich 2021 年 10 月 29 日
編集済み: the cyclist 2021 年 10 月 29 日
I am reading an excel spreadsheet into a table in MatLab. The number of rows and columns can vary.
I need to find the maximum row number of the table. I see plenty of ways to find the row number of the maximum value in a matrix, but can't seem to find a way to get the maximum row number. So, to be clear if the spreadsheet read into the table has 11,456 rows, I want an expression that results in:
MaxRows = 11456

採用された回答

the cyclist
the cyclist 2021 年 10 月 29 日
編集済み: the cyclist 2021 年 10 月 29 日
% Example table
n = 7;
x = rand(n,1);
y = rand(n,1);
T = table(x,y);
% Get number of rows
MaxRows = size(T,1)
MaxRows = 7

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by