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.
I am trying to write a program that reads data stored in text files (CSV format) and plots these data; the user is allowed to pick how many plots/files they would like to see. Currently, when a new file is opened, the data read from it are appended to an existing array. However, this does not deal well with datasets of dissimilar length - if one set is shorter than another, the program will enter rows of zeros to match the length of the longer. I saw a possible solution here (an earlier post), but this assumes that my data are all in separate 1D arrays rather than the single 2D array I am using. Is there a way to dynamically write to an unspecified number of arrays (in a loop or something?) or a better solution?
Attached is my code along with two sample test text files.
I am confused about your code/data files. How does the data from the text file (and therefore the array) translate to the graph? The data in the first file is: