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.
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.
03-24-2017 04:31 AM
Thanks for the tip! but I'm using a recent version of Labview and this doesn't work unfortenately
03-24-2017 04:36 AM
Then you should be able to implement the VI on your own following what you see.
At least this part can be useful to learn about the LV palettes instead of receiving a ready-to-use homework with no real learn effect.
03-24-2017 08:29 AM
Actually the case structure is completely superfluous!
Here's a simplified version:
03-24-2017 08:31 AM
If you have a recent version of LV, then it should work fine. The most recent version is 2016, which is the version I used to create the snippet.
03-24-2017 09:27 AM
Depending on your browser, you may need to drag and drop to your desktop first. Then drag and drop that file to the block diagram. Firefox is one browser I know of that does not allow direct drag and drop from browser to block diagram.
03-27-2017 05:12 PM
@BowenM wrote:
@crossrulz wrote:
One simple solution would be to use the Ramp function to create an array of numbers from 0 to 10 and then the Riffle function.
Assuming this actually is a homework problem... that would be a very interesting solution. If someone handed that to me I don't know if I'd be mad because they obviously didn't do the assignment as I intended, or impressed that they came up with the workaround
And I would give it an A+. The problem is essentially "Shuffle the deck" (where here "deck" has only Ace of spades through the 10 of spades). I'm curious how the Riffle function works -- there is a known "most optimum" method of randomly ordering a set of size N (10, in this case). Famous Darren presented a fascinating talk a few years ago where he presented the "Texas Lottery Problem", namely drawing N lottery balls from a set of M (maybe 5 from 52? I don't remember). He presented 3-4 ways to do it, had the audience "vote" on which would be fastest, and almost all of us (including me) were wrong. But I raised my hand and said "But I can do it even faster using the correct Shuffle Algorithm" -- fortunately, I turned out to be right, but not by much ...
Bob Schor
03-28-2017 07:18 AM
03-28-2017 07:21 AM
something like this
09-30-2020 05:24 AM - edited 09-30-2020 05:27 AM
Thanks! That's simply brilliant.