multidimensional array - Maximum value in a 3D matrix in MATLAB -


this question has answer here:

let if have 3d matrix a=randi([1, 9],[2 2 9]), how find maximum value slices , return 1 maximum value? thanks!

use matlab's max function follows:

max(a(:)) 

example:

a=randi([1, 9],[2 2 2])  a(:,:,1) =   5     1  9     4  a(:,:,2) =   1     8  8     8  max(a(:))  ans =  9 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -