12-12-2008 12:18 PM
I have the following code attached but I am having trouble trying to figure out how to attach a table to it. I would like for my result to give me a graph, as it does, as well as a table. I have been reading a lot and going over many examples but can't seem to figure this one out. Can anyone help? Thanks


Solved! Go to Solution.
12-12-2008 12:48 PM - edited 12-12-2008 12:49 PM
First, your images are on your hard drive and obviously we have no access to that. Attach them to the post.
Your problem is fairly simple. An XY graph is a bundle of an x array and a y array. A table is a 2D array of strings. You can use the Build Array to create a 2D array from your x and y data and then convert to strings with the Number to Decimal String. In the image below, I also inserted a Transpose 2D array so that the x data would be in one column and the y data in another. If you want it displayed in rows, don't transpose.
12-12-2008 12:54 PM
12-12-2008 01:01 PM
Dennis Knutson wrote:... then convert to strings with the Number to Decimal String
Hey Dennis, just out of curiosity, what is the purpose of converting the numbers to decimal strings? Cant you have an array of numbers?
12-12-2008 01:11 PM
That's because the Table only accepts string type arrays , no numeric can be used
12-12-2008 01:23 PM - edited 12-12-2008 01:24 PM
Hmmm. I thought that a table could have only 1 type, but it could be numeric or string type, just not both.
Could someone explain why that is not correct?
12-12-2008 01:27 PM
12-12-2008 01:30 PM
Array constants are not the same thing as a table. Look at the help for a table and see:
A table is a 2D array of strings. Use the String functions to manipulate tables.
Each cell in a table is a string, and each cell resides in a column and a row. You enter headings when you add the table to the front panel, and you can change them using the Labeling tool or Operating tool. The row and column headings of a table are not part of the table data. Table headings are separate pieces of data that you can read and set using Property Nodes.
The index display at the upper left corner of the table indicates which cell is visible. You can operate these indexes just as you do on an array.
12-12-2008 01:31 PM
Ahhh, then I was misunderstanding what Dennis was doing.
So if you wanted to keep everything as numbers, couldnt you just make an array indicator?
What is the benefit of having a table instead of array indicator?
12-12-2008 01:37 PM