using maxk with named columns

3 次查看(过去 30 天)
I want to locate the maximum number in a matrix.
For instance
A = magic(5)
to show the highest value I use maxk(A,1)
when I assign variable names to the table, maxk doesnt work, probably because there are now also names in the table.
How do I get this to work?

采纳的回答

Ameer Hamza
Ameer Hamza 2020-10-9
编辑:Ameer Hamza 2020-10-9
If all the columns in the table are numeric
max_val = max(T{:,:})
Note maxk(x,1) is same as max(k).

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Descriptive Statistics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by