×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

A few questions
2

A few questions

A few questions

(OP)
I have a variable defined in Mathcad EX: C.e = 5m, I would like to input "C.e" into an excel table in the Mathcad file, how can I do that? Please see attached screenshot.

My second question would be:

There are four different conditions for calculating one variable, each with its own equation. For example: The equation for the exposure factor is different if the building is in "Open Terrain, Rough Terrain, etc.."

What's the cleanest way of setting this spread sheet up to deal with all four level terrains? How can I specify which one applies? I'm creating this spreadsheet in a format that will be used by other people for other projects.

Much thanks
Replies continue below

Recommended for you

RE: A few questions

Choose Component from the Insert menu.   If you don't want to display the table in your worksheet, select the "Display as Icon" button.  Then, select your input and output cells in your excel sheet. Finally, enter your input variable at the bottom left of the sheet display, and your output variable at the upper left.

I think the cleanest setup is to have the user input the Exposure Catagory.  Then, deal with the exposure factors using "if statements" within Mathcad.  But first, assign A=1, B=2, C=3 and D=4.  Makes the if statements easier to write.  In this way, you don't need the excel component at all.

 

RE: A few questions

I handled wind load inputs with a list box, and used the results from that as an index to an array that store the proper values.  "If" statements also work with this.  I find it to be pretty neat and clean, but the list boxes don't print very neatly (Mathcad 2001 pro).

I like the list box, or other components, because you limit the available user input to only those values you want to be used and don't have to account for someone choosing a value of "5" when the correct input range is 1-4.  Plus you can just click on what you want.

RE: A few questions

You are missing your "otherwise" statement, to tell it what to do and complete the function.  I find the IF's easier to use by pressing "add a line" initially and placing the if-otherwise there, as shown.  If you don't use your otherwise then you get exactly the problem you're noticing.  See the attached example.

In the attached picture, the β1 factor for concrete design is calculated using an IF statement.

RE: A few questions

I forgot to note, you have to use the "if" and the "otherwise" from the programming toolbar or keyboard shortcut; you can't just type them.

RE: A few questions

(OP)
Thanks for the response. My otherwise statement is included (as can be seen by the screenshot.) Perhaps I'm understanding you wrong?

RE: A few questions

I understood you wrong.  You need an "and" as mentioned above if the logical test is true only if both test 1 and test 2 are true.  

RE: A few questions

(OP)
Great every thing is working now!

You were right UcfSE about the list boxes, they don't print neatly (the options in the boxes don't show) and I'm using MathCAD 14

RE: A few questions

Yeah, I don't understand why they don't print nicely.  When I need the calcs to be legible also, I usually include an extra line that repeats the value of the variable tied to the list box.  At least then you can follow your numbers on paper.  

RE: A few questions

Clansman,

For the exposure category,  I set up a global variable as follows:

(B C D) = (1 2 3)

Set up a 1 X 3 matrix, then ~ (keystroke for global definition,the one that is the 3 line equal sign), another 3 X 1 matrix on the right side of the equal.  Now type in the B C D no quotes, and the 1 2 3 in the other matrix.

Now you can input:   Exposure := B (without quotes) and it is aready equal to 2.  Now you have an index to use in a vlookup to pick the correct value for exposure B.  

It looks good on the sheeet because you don't need the quote marks for a text variable, you can just use the letters when you input.  


regards,


chichuck

 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close