How to find the maximum value of the first column in multiple matrices?

5 次查看(过去 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?

采纳的回答

Chunru
Chunru 2021-7-29
X = rand([6,3,6]);
% find maximum value of 1st column of each 6 matrices
max(squeeze(X(:, 1, :)))
ans = 1×6
0.5877 0.9588 0.8799 0.8142 0.8901 0.9446

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by