Two tiny functional VIs
For the last a few months I am still learning Machine Learning with LabVIEW (which might not be the best language for ML) and doing more signal processing jobs. I tried to follow some MOOC courses on R and Python to master better tools for ML. Really got some to-do projects in my mind and want to implement them soon.
Since I am dealing with a lot of file loading recently, this vi was built to scan a folder to find the file starts with the specific string. This is nothing complicated and I am sure there is a simpler solution. But here is an example of the implementation:
It iterates the names of the files and quits if finds the name starts with the “Start with” string.
Another function is “Random selection from elements“. It allows the user to randomly select from their own dataset, which could be a number of integers, strings or any other data types. Again this is very simple but I found it quite useful in many “simulation” applications.
The input array can be replaced by any other types of arrays. It is worth mentioning there is a “Riffle.vi” in LabVIEW that can randomly disorganize the input elements (so the output is a disorganized array). The randomness can be repeated by setting the seed to the same number.