Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Variables and data table 1

Status
Not open for further replies.

haynewp

Structural
Dec 13, 2000
2,306
I want to start using Mathcad instead of Excel but I am having trouble figuring out how to do something in Mathcad.

Usually in Excel, I have several variables that have a lot of data associated with each one. For instance, I would create a table that looks like this in excel:

SHAPE: Ag rx ry rz
L3x3x3/16 1.090 0.933 0.933 0.596
L3x3x1/4 1.440 0.926 0.926 0.592
L4x4x1/4 1.930 1.250 1.250 0.795
L4x4x5/16 2.400 1.240 1.240 0.791


Then I would have a pulldown menu that contains the variables: L3x3x3/16 L3x3x1/4 L4x4x1/4 L4x4x5/16.

Then based on the variable I choose, all the other properties are automatically assigned somewhere in the spreadsheet(Ag, rx, ry, rz) from the "index" and "match" functions.

Is there something equivalent to this in Mathcad? I don't want to have to type in all the different properties each time for each variable.

 
Replies continue below

Recommended for you

The analogous thing can be done in Mathcad using Active Components. You'd have similar pulldown menus to select the properties and then do lookup's or other processing to the final result. If you hunt around the Mathcad Library and/or the Mathcad Collaboratory, you can find examples:


TTFN
 
Okay, I inserted my data as an "input table" which is being read from an outside text file. So I am just getting raw numbers which are in the form of an array which I am able to access each number indiviudally wherever I need to. So that is great.

But I need to assign units to each data value that I am getting from the array, and the units will vary (some numbers represent areas, others weights, etc.) Everytime I try to assign a unit value I get a new converted number that comes out unitless.

For example I am trying to place "in" (inches) in the placeholder behind the data number "3" that I am accessing from the array. I put "in" in the placeholder and the number turns into "36 in/ft".

 
If units don't convert correctly, it's most likely that you've redefined a built-in unit somewhere in your sheet that's honking up the unit conversion.

TTFN
 
I think I figured out what to do. When I access a number from the array, I have to multiply the dimension out to the side.

For example, my data table is an array named "A". I am trying to access the number "5" from the array which is in position (1,1).

Then A(1,1)*IN^2=5IN^2

I mulitiplied the expression A(1,1) by IN^2 to get 5IN^2.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor