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

Ansible warning on jinja2 braces on when -

Parsing a protocol message from Go by Java -

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