How to get arg min of an N-dimensional Matrix ?
Show older comments
Hi, i'm having an image of size[280,307,191] and i want to get the argmin of it,Any help?
Accepted Answer
More Answers (3)
Cedric
on 15 Apr 2013
How do you define argmin? If it is the global min, you can get it as follows:
min(M(:))
where M is your 3D array.
4 Comments
Rawan hamdi
on 16 Apr 2013
Edited: Rawan hamdi
on 16 Apr 2013
Jan
on 16 Apr 2013
Why do you want to implement something, when you do not know its mathematical meaning?
Sreeda M A
on 13 Jul 2016
can you please explain what values should I give for M ??
Andrei Bobrov
on 13 Jul 2016
Edited: Andrei Bobrov
on 13 Jul 2016
Hi Sreeda M A! Example:
M = randi(400,280,307,191);
Sean de Wolski
on 15 Apr 2013
Or:
min(min(min(M)))
2 Comments
Ties Hendrickx
on 29 Apr 2019
Nope, this will return the minimum value and not the index of the minimum value
Steven Lord
on 30 Apr 2019
0 votes
If you're using release R2019a or later, you probably want to call min with the 'all' dimension input and the 'linear' flag.
Categories
Find more on Image Segmentation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!