How to find the maximum value of the first column in multiple matrices?
조회 수: 12 (최근 30일)
이전 댓글 표시
i have created a matrix, X = rand([6,3,6]);
Now i want to find maximum value of 1st column of each 6 matrices.How to solve this?
I have done this
Q=max(X(:,1));
but here i am able to get only the max value of 1st column of the 1st matrix. i want to find for each matrices. could anyone suggest me some hint?
댓글 수: 0
채택된 답변
Chunru
2021년 7월 29일
X = rand([6,3,6]);
% find maximum value of 1st column of each 6 matrices
max(squeeze(X(:, 1, :)))
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!