Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
I am wondering how i can write a Creo Relation in Mathcad 15.
In Creo the relation looks like this:
IF MOD_WIDE == 4 | ||
LEFT_BAY_MOD_WIDE = 2 | ||
ELSE | ||
LEFT_BAY_MOD_WIDE = 3 | ||
ENDIF |
So when the variable MOD_WIDE is defined as 4, then the other variable LEFT_BAY_MOD_WIDE is set equal to 2, otherwise it is 3.
Any suggestions?
Solved! Go to Solution.
OK, Mathcad has a lot of equal signs with different meaning - you see three of them in both of my posts.
1) ":=" This is the assignment sign. You get it by simply typing ":" or you can use it from the evaluation toolbar
2) "=" The (bold) boolean equal sign; you use it to compare values; you get it by typing Ctrl&+ or take it from the Boolean toolbar
3) "=" the evaluation equal sign used to numerically evaluate the LHS; get it by typing the normal "=". There is a preference setting which results that when you type on the LHS a variable which is not defined and then the normal = you get a :=
I attach the worksheet for your convenience
Better so - for Mathcad 15, Prime and Express:
Any special reason for that preference other than that we would have to replace "otherwise" for "else" (or "elseif") in Prime?
Personally I prefer the programmed variant as I feel its a more clearly representation, especially when it comes to nested branches. But I think its a matter of peronal taste.
If shortness matters one could use in this case the following, but I wouldn't recommend it:
BTW it works, because in MC FALSE=0 and TRUE=1.
I am not getting either of these to work quite right. I think its the BOLD = sign. is not appearing that way on mine. Any suggestions? what might i be doing wrong.
The first one i got close but it wont assign the mod_wide := value into the next part.
OK, Mathcad has a lot of equal signs with different meaning - you see three of them in both of my posts.
1) ":=" This is the assignment sign. You get it by simply typing ":" or you can use it from the evaluation toolbar
2) "=" The (bold) boolean equal sign; you use it to compare values; you get it by typing Ctrl&+ or take it from the Boolean toolbar
3) "=" the evaluation equal sign used to numerically evaluate the LHS; get it by typing the normal "=". There is a preference setting which results that when you type on the LHS a variable which is not defined and then the normal = you get a :=
I attach the worksheet for your convenience
Thank you so much. The "=" is actually shown as an arrow (Evaluate Symbolically) in the evaluation toolbar. Also i had forgotten to hit spacebar to grab the whole part to evaluate.
The symbolic evaluation (right arrow) is yet another of Mathcads equal signs but its not used in my examples. It has nothing to do with the boolean (bold) equal sign.
Really both say they use "ctrl +"? i r confused.
The shortcut for symbolic evaluation is Ctrl+.
In my german localized version the tool tip says that I get the fat boolean equal sign with Ctrl+=, but hats wrong, it's Ctrl++ on a german keyboard.
Anyway, just try and you will see immediatly if you get the right sign.