From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
jchretien

Resizable Max & Min

Status: New

I propose to replace Max & Min for two elements, which we could resize like some array functions for 3, 4, 5,... elements when you know how many you have to compare.

 

I actually have 5 elements coming from a bundle, I have to do this

 

bundled.PNG

 

minmax.PNG

6 Comments
JÞB
Knight of NI

why not just "bundle to array" and use array min max? 

 

(You don't have to gyrate through that odd construct after all):smileywink:


"Should be" isn't "Is" -Jay
crossrulz
Knight of NI

Jeff, I'm pretty sure you mean "Cluster to Array".  But even that only solves the exact example given.  If you just have a bunch of independent values to compare, you would just use the Build Array.  I'm not seeing much use in the proposed construct.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
AristosQueue (NI)
NI Employee (retired)

There would be a performance benefit to not actually constructing the array. But the use case is pretty rare. I've done it a couple times in my carreer for three values -- and in LV that's easy enough to code up with a Select node (use some form of the trinary operator in most other languages). Never had reason to do it for more than that except when the data came in as an array in the first place.

Darin.K
Trusted Enthusiast

Is that a cropped screenshot or really old LV?  That cluster wire should be brown.

 

At any rate, I would be ok if the Array Max/Min would imply the cluster to array conversion, works for single type clusters but not mixed types. 

JÞB
Knight of NI

Now that's a nice idea enhancement, just wire the cluster to min max.  I'm not sure how usefull this would be for a cluster of booleans or clusters of arrays (Ragged 2D arrays) .  Yeah, I think that one is a problem....but some means of sorting (1,1) and (1,1,0) is definable.


"Should be" isn't "Is" -Jay
jchretien
Member

Ok guys, here's my best paintbrush skills to show my point. It's not only about clusters, just multiple values you want to compare without the harsh of creating an array of 3 values.

bestpaintbrush.PNG