08-03-2004 02:46 PM
06-07-2008 11:55 PM
Hi,
I'm trying to read in a text file that has the first row for x and the second row for y. The text file is attached to this thread. I'm not suppose to read it by column. I need to read it by row for each element an x and a y. After it reads the text file and plots the data on Lab View, I want to list the numbers on a table that can be shown on the front panel once it is implemented.
06-08-2008 01:58 PM
06-08-2008 03:11 PM
06-08-2008 05:09 PM
Here's a modification that will display the data in a table. I also simplified the Index Array.
I don't know what you mean by 'cubic graph' and whenever I run the VI, I only get a single plot. If you are getting two different plots, is this with the same data file that you posted earlier? Attach an image of the graph with two plots.
06-08-2008 07:06 PM
I'm actually getting two plots on my graph. Using the same data file that I have posted earlier, I'm getting two plots on one xy coordinate. I'm sorry I wasn't specific before. The x axis goes from one through five. The y axis computes the cube of the x axis. So, if x is three then the cube of three is 27. I will go ahead and attach the two plots to this message. The attachment is in Corel Paint Shop Photo Pro Photo X2. I'm also attaching the one that you modified earlier. Thanks once again.
Can you briefly explain me how the file is being read. In what direction is it reading the file from the text?
06-08-2008 07:26 PM - edited 06-08-2008 07:27 PM
06-08-2008 08:12 PM
06-08-2008 08:25 PM
Okay, in your data file and on each row, there is a tab after the last value and then a line terminator. Read From Spreadsheet in it's default setup, uses a tab character as a delimiter. It reads the row, sees that last tab and assumes there is data there. It creates an element in the output and even though there is no actual data, you have to have something in the array and it defaults to 0. Just open the Read From Spreadsheet and run it. You will see that in column 5 of the output array, a 0 in each row.
The Read From Spreadsheet reads row by row.
06-09-2008 03:10 PM