I've done smallest, then largest. Two ways - second a bit silly but also
works:
(<./,>./) 2 3 4 5 6 NB. what you were thinking of
2 6
(2 {._1 |.\:~) 2 3 4 5 6
2 6
OK?
Mike
On 10/05/2019 22:55, 'Skip Cave' via Programming wrote:
How can one find the largest & smallest value in a vector?
(<./]>./)2 3 4 5 6
6
NB. nope!
(<.>.)2 3 4 5 6
2 3 4 5 6
NB. Nope!
I want:
(??)2 3 4 5 6
2 6
Skip
Skip Cave
Cave Consulting LLC
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm