[I want a node] Minimum and maximum value

I cannot create a node.
It should find the minimum and maximum number from the input value.
Example: Input - (2; 4; 3; 5; 6; 8; 7)
Output - minimum = 2
Exit - maximum = 8

Here they are:
https://xod.io/libs/xod/math/max/
and
https://xod.io/libs/xod/math/min/

Do you want the min/max of a fixed list-size, or min/max of any set of numbers? For any set of numbers, you would need an UPD pin to tell it when to compare the new number & RST pin to clear everything & start new set. Buffer node can be used to remember last min/max numbers & UPD pin to update new buffer values.

No, I meant one input and the number changes on input , but the outputs will have the smallest and largest number during the operation of this node.

pulsâ€¦ node at the top is pulse on change. It is followed by defer node so that new input value can update greater/less and gate nodes before we send the pulse through.

Buffer nodes store MIN & MAX values found so far. MIN value is updated if RST pin is pulsed or new value is less than current MIN value. MAX value is updated if RST pin is pulsed or new value is greater than current MAX value. The affect of RST pin is to force the current value to be the new MIN & MAX values. It should get a pulse when the first valid input number is â€śactiveâ€ť.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.