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일

0 개 추천

If all the columns in the table are numeric
max_val = max(T{:,:})
Note maxk(x,1) is same as max(k).

댓글 수: 2

Rick Huisman
Rick Huisman 2020년 10월 9일
Thank you :)
Ameer Hamza
Ameer Hamza 2020년 10월 9일
I am glad to be of help!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Descriptive Statistics에 대해 자세히 알아보기

질문:

2020년 10월 9일

댓글:

2020년 10월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by