Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

TABLES 1

Status
Not open for further replies.

RandomAxe

Mechanical
May 13, 2013
61
I have entered my datasets using 'Insert Table' in mathcad prime. All variables have 12 different values (its annual data, so each variable has 12 values) which I have entered as a table with 12 rows and 1 column, and defined the units as applicable.

I am performing various calculations with this data, and the results are then output as a table in the same format (12 rows 1 column) however it does not appear that each row uses the data from the corresponding row in the input variables?

For example, I am calculating reynolds number and have input data for the velocity, density and viscosity as a table with 12 different values and then defined pipe inner diameter as a standard variable (which doesn't change). I then defined the formula for reynolds number. The results are output as a table however the top result (row 1) is not calculated based on the corresponding row 1 for velocity, density and viscosity.

I cannot find any information in matncad help files on using tables, what would be the correct way to do this? Are tables not meant to be used this way? Thanks
 
Replies continue below

Recommended for you

Ah...makes sense. Calculation sheet attached, you'll hopefully see what I mean. I suspect I’ve been working with excel for too long…

Basically I thought the output table for Reynolds number would use the corresponding row from the input tables. So the top row I would expect the Reynolds number to be 1.022*10^7, when in fact it is 7.75*10^7.

Thanks
 
 https://files.engineering.com/getfile.aspx?folder=8ea1ef1a-d165-444f-b2b0-b1589d0bc043&file=reynolds_number.mcdx
if you want to do a "row" calc then either use subscript or the vectorize option. see attached

Capture_y6lace.png
 
Attached is a Mathcad 15 file that Mathcad Prime should be able to upconvert. I've also included a PDF and s screenshot. MP should be pretty similar to M15, although I'm unclear whether you can do a paste table like you can in M15. <CTRL>+6 allows you to index the tables columns. Mathcad no longer allows mixed units in tables, so the units are added to the individual vectors. "i" is the range variable that allows you to select a specific element by typing "[" after the variable name, as in Re1[0 to access Re1[sub]0[/sub]. You can start indices at 1, but Mathcad's default is 0. The actual calculation was done with indices, but you can usually get away with just the variable names. The resultant is unitless, which is a good check, since the Reynolds number is supposed to be unitless. I think this is, in addition to the WYSIWYG math, is THE strong point of Mathcad, since that's not really available anywhere else besides SMathStudio, which is a freeware attempt to clone Mathcad.

Reynolds15_t9njcm.gif



TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Thanks chaps, I'll have a go with those this evening. Much appreciated.
 
Thanks again. I got it to work with the vectorize function, but didn't have any luck using an index. I defined i using the rows function but then when I defined Reynolds number using subscript i on the velocity, viscosity and density variables it resulted in an error message saying that all the variables in the equation are undefined.
 
 https://files.engineering.com/getfile.aspx?folder=ca20c6f9-b5f8-49ff-a860-98f6c6d1fd48&file=reynolds_number2.pdf
do you write the index using a dot (.) or [ ? you need to use [ to create an index. using the dot create a subscript font
 
As I mentioned before, "[" creates the indexed variable.

"." creates a literal subscript, i.e., it's just for show and would function no differently than if the "." weren't inserted.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
Ah - yeah that's sorted it. Thanks again folks
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor