Setting values from arrays to be the data for the column of a table


Recommended Posts

I have a set of global variables called "ProcedureDummy0" , "ProcedureDummy1" ... that I set ={0,0,0,0,0,0,0,0} at startup. I will change the value of these variables in a table (I have figured out a semi-janky way to do that with input boxes and a table), but I also want to be able to display the values in a table. Not including headers, I want the cell in the "m"th row and the "n"th column to be "ProcedureDummyn[m]" I set the expression for the column to {ProcedureDummy[1],ProcedureDummy1[1],ProcedureDummy2[1],ProcedureDummy3[1],ProcedureDummy4[1],ProcedureDummy5[1]} (each of those are still 0 from my startup sequence, and each of those will display as 0.000 with the variable value element). But the table displays 1.00 for each cell in the table. It does the same with 2.00 and the 2nd element, and so on. Why? Can I fix this?

Link to comment
Share on other sites

You can't put anything but actual numbers or strings inside {} when defining an array.  So: {1,2,3}, or {"a","b","c"} are valid, but {myVar1, myVar2, myVar3} is not.

I, personally, would consider creating a two dimensional array called simply procedure that has, it looks like, 8 columns and 6 rows?

global procedure = {{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0},{0,0,0,0,0,0,0,0}}

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share