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.
To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI generates an array of random colors, for a given number of rows and columns.
Description
This VI is just a fun VI that I created while teaching LabVIEW Basics I. It works well for highlighting subVIs, array manipulation and shift registers, all key concepts in Basics I. I'm sure there are more efficient ways of accomplishing what I am doing here, so if you have a suggestion, let me know.
This VI generates a list of random colors and then inserts the color twice in a 2D array. The user is able to specify the size of the output array and the array will resize based on the user's dimensions. Each color is inserted twice so the resulting 2D array would resemble a game of concentration or memory with all of the cards flipped up.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
> I'm sure there are more efficient ways of accomplishing what I am doing here, so if you have a suggestion, let me know.
Well, here's a much simpler version that does the same, however we would not learn about loops and shift registers and such . (The
last two functions are riffle and reshape)
I have a couple of suggestions, for example: