cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - New to the community? Learn how to post a question and get help from PTC and industry experts! X

Translate the entire conversation x

Mathcad clarifications needed

NareshJ
7-Bedrock

Mathcad clarifications needed

Hi 

I would like to understand the solutions for the below queries raised by a user. Appreciate your help.

 

  • Aligning of text boxes and formula boxes.
  • Array for various values for same function.
  • How to use if command to state design is safe or not. Usually, we need to green highlight if the design is safe and red if not safe.
  • To add graph for considering various values and array and another function. Like SFD, BMD etc.
  • Setting company standard template for page format
  • Add calculation template for similar repeated calculation.
  • Drop down menu similar to Excel.
  • We are finding difficulty in adding unit as %
  • Can we import more symbols such as “therefore”; “similarly”;
  • How to add border for text box or important formula box.
  • Adding table for various values for one function & how to Vlook-up from it?

Thanks

Naresh

12 REPLIES 12
StuartBruff
23-Emerald IV
(To:NareshJ)

What version of Mathcad does your user have?  Is it Prime or Prime Express (lacks many features of Prime, such as programming)?

 

Can you give some specific examples of the problems your user is having (with screenshots and worksheets)?

 

I'll assume that you are dealing with Mathcad Prime 11 for the following:

 


@NareshJ wrote:

Hi 

I would like to understand the solutions for the below queries raised by a user. Appreciate your help.

 

  •  

Thanks

Naresh


 

  • Aligning of text boxes and formula boxes.

 

Manual, I'm afraid.  This is a long requested feature.

 

  • Array for various values for same function.

You can find many examples of this within the Mathcad Help.   Here are two methods (see image). 

 

One uses application of a function to a vector.   The vec function is new to Mathcad Prime 11 (but easily replicated in earlier versions).  It is intended to convert range variables to vectors, but can also generate vectors directly using the same arguments as one would use in a range variable.

 

The second uses the built-in function to generate an mxn (16x16, in this instance) matrix of values for a 2-argument function.

2025 09 16 A.png

 

  • How to use if command to state design is safe or not. Usually, we need to green highlight if the design is safe and red if not safe.

Use one of the advanced controls.  Pass the "safe" value to the control, and use control scripting to set the control colour.   A Button or EditBox are probably the better controls to use.  I think there have been a couple of recent examples posted on the Community.

 

  • To add graph for considering various values and array and another function. Like SFD, BMD etc.

See the previous image.  In Mathcad Prime, look under the Plots tab in the Ribbon.

 

2025 09 16 B.png

 

  • Setting company standard template for page format

Create a worksheet that accords with the company standards and save it as a Mathcad Template.  Note that you can add images to the header and footer, as well as other information, such as worksheet name, date saved.  See Mathcad Help for more details.

 

2025 09 16 C.png

 

  • Add calculation template for similar repeated calculation.

See above.  

 

  • Drop down menu similar to Excel

What kind of menu are you referring to?  Do you mean in the Mathcad application interface?  Or within a Mathcad worksheet?

 

Use a control within a worksheet.  The ComboBox provides a drop down menu.  Other controls use sliders, such as the ListBox (although I've probably forgotten something here!).  The user has to set up the ComboBox manually, but can programmatically populate the other controls.

 

2025 09 16 D.png

 

  • We are finding difficulty in adding unit as %

Type a value then immediately type "%".   If this doesn't solve your user's problem, please explain what they are trying to do?

 

  • Can we import more symbols such as “therefore”; “similarly”;

If they are available in Unicode, then there is a good chance that you can copy & paste them from elsewhere.  

 

"therefore" already exists in Mathcad Prime.  Look under the "Symbols" tab in the Math Ribbon.

 

2025 09 16 E.png

 

  • Aligning of text boxes and formula boxes.

See comment about alignment.

 

  • How to add border for text box or important formula box.

 

See my first image.  This is a new feature in Mathcad Prime 11.

 

  • Adding table for various values for one function & how to Vlook-up from it?

See the earlier reply about creating arrays.

 

Then look up (!) the examples in Mathcad Prime Help.

 

file:///C:/Program%20Files/PTC/Mathcad%20Prime%2011.0.0.0/Help/en/index.html#page/PTC_Mathcad_Help/example_lookup_functions.html#wwID0E1LEGB

 

Stuart

Hi Stuart,

 

Thanks a ton for this reply. I shall revert post conveying this information with the user.

Regards

Naresh

StuartBruff
23-Emerald IV
(To:NareshJ)

No worries, Naresh.  

 

Stuart

Werner_E
25-Diamond I
(To:StuartBruff)

Just a small addition to Stuart's comprehensive explanations.

If you want to add percentage 'unit' when you define a variable, you can use the % symbol as suggested by Stuart.

But if you want to display a variable or calculation result as percentage this will not work. Unlike the old Mathcad, Prime does not allow the percent sign as a unit symbol (unfortunately). Instead, you have to set the number format to 'Percent' in the menu.

Werner_E_0-1758048040152.png

 

BTW, you could type 1% at the unit place holder, but that really looks ugly and confusing!

Werner_E_0-1758048760029.png

 

 

StuartBruff
23-Emerald IV
(To:Werner_E)

I suppose a bit of cheating might not go astray, provided one doesn't mind pasting the % symbol into the units holder ...

 

2025 09 16H .png

 

I created "f%" in the Find edit box, pasted that into the left-hand side of a definition, deleted the "f", and set the % variable to label Constant (formatted to be bold brown).

 

More readable but requires a bit more effort than just typing "%".

 

Stuart

Werner_E
25-Diamond I
(To:StuartBruff)


@StuartBruff wrote:

I suppose a bit of cheating might not go astray, provided one doesn't mind pasting the % symbol into the units holder ...

 

2025 09 16H .png

 

I created "f%" in the Find edit box, pasted that into the left-hand side of a definition, deleted the "f", and set the % variable to label Constant (formatted to be bold brown).

 

More readable but requires a bit more effort than just typing "%".

 

Stuart


Shouldn't %  equal 0.01 rather than 100?

When I read x=0.3 % I would assume that x has the value 0.003, not 30.

Werner_E_0-1758059968738.png

BTW, I created the % variable name in the first line by typing "% and then the DEL key.

Unfortunately this does not work when placing that variable name in the unit placeholder - so we have to use inconvenient copy&paste.

 

StuartBruff
23-Emerald IV
(To:Werner_E)


@Werner_E wrote:

@StuartBruff wrote:

I suppose a bit of cheating might not go astray, provided one doesn't mind pasting the % symbol into the units holder ...

 

2025 09 16H .png

 

I created "f%" in the Find edit box, pasted that into the left-hand side of a definition, deleted the "f", and set the % variable to label Constant (formatted to be bold brown).

 

More readable but requires a bit more effort than just typing "%".

 

Stuart


Shouldn't % rather equal 0.01 than 100?


Yes, but no, but yes.  However, not when you want it to have the effect of percent. 

 

I'm not actually sure what type of beast % is in Mathcad Prime.  It acts like a postfix function but doesn't appear to be one.  Prime Help says it is an operator but it doesn't behave like other Mathcad operators (which often act like functions) by being too attached to its argument, and it can't be used directly as a function.  

 

Stuart

Werner_E
25-Diamond I
(To:StuartBruff)


Yes, but no, but yes.  However, not when you want it to have the effect of percent. 


??? Seems that I don't get your point. 

For me it would be irritating (in fact looking wrong) to see  30 = 0.3 %  instead of  30 = 3000 % .

 

And for me % looks like a function which only can used in postfix notation, too. 

Werner_E_2-1758085291973.png

at least the error message for symbolic evaluation is talking about an "argument":

Werner_E_3-1758085715121.png

The error message for numeric evaluation is different and just talks about "this value":

Werner_E_4-1758085756030.png

 

It also could be that the % we see when we use the corresponding "number format" has nothing to do with this function, not sure. On the other hand we can copy and paste a percent-formatted number and it works OK. It's a strange beast, indeed.

 

Actually I don't understand why % is not simply implemented in Prime as a constant (value 0.01) or unit, as it seems to be the case in Mathcad. After all its just a simple multiplier when you define a percentage value or a divider  when you  display a value in percent. 

It could be so easy to just type % in the unit placeholder rather than to having to change the number format in an awkward way from the menu. 

It may not be needed that often but how about very tiny or very large values which need to be expressed in percent? There seems no way to chose Scientific or Engineering format if you want it to be displayed in percent, let alone in 'per mille' or 'per myriad'.

Werner_E_0-1758074333027.png

 

StuartBruff
23-Emerald IV
(To:Werner_E)

Hi, Werner,

 

Ja, du hast recht. Ich hatte einen kurzen Hirnaussetzer (Well, I hope it was brief, anyway).  I'd been trying to refresh my memory about how to create user-defined units and their inverses, und mein Gehirn hat sich im Kreis gedreht.

 

Oh, I forgot to mention one other thing that bugs me about the percent formatting: there is no space between the number and the % symbol, as there should be according to ISO 80000 (and NIST 330).  As with several Prime amendments, I wonder who (user) is behind some of the changes (additions and omissions)?  I sometimes struggle to follow the logic behind such changes. If someone wanted a spaceless % symbol, I would have thought that should have been optional (right-click, global setting, etc.).

 

I know that some national linguistic standards omit the space, but, as an international maths application, Mathcad Prime should be following SI usage, surely?

 

Stuart

Werner_E
25-Diamond I
(To:StuartBruff)

Brain freeze? Oh yes, I know exactly what you are talking about from my very own experience. 😞

 

I fully agree that Prime should conform to the standards. Unfortunately it doesn't in quite some respects. And yes, it would of course be useful if deviating local customs and practices in certain industries could be taken into account as an option. The possibilities for the right-click menu in Prime are generally still very much up for development—especially since there are no convenient floating palettes either.
Considering all the other disadvantages Prime still has, the missing space, usage of 'wrong' typefaces or function names not conforming to the standards (log, asin,..) may not be the most pressing issue, but it is nonetheless something that PTC should address.

LucMeekes
23-Emerald IV
(To:StuartBruff)

"Mathcad Prime should be following SI usage, surely?"

Nope, they didn't even try.

What's wrong is the fact that the Prime font setting for units by default is italic, it should be roman (upright.)

Then there's asin() instead of arcsin() as well as for cos, tan, cot, sec and csc. And for the hyperbolicus: asinh() should be arsinh() etc.

We recently had the log, lg, ln discussion.

What could be improved is to pre-define all (yes  all, from z to Z) prefixes for all SI units.

 

One thing PTC did right, was to correct the values of natural constants after the SI changed some more definitions of the basic units about 10 years ago.

 

Luc

 

 

 

 

StuartBruff
23-Emerald IV
(To:LucMeekes)

Hi, Luc.

 


@LucMeekes wrote:

"Mathcad Prime should be following SI usage, surely?"

Nope, they didn't even try.

What's wrong is the fact that the Prime font setting for units by default is italic, it should be roman (upright.)


Indeed.  I don't suppose you can get much more authoritative than the BIPM themselves:

 

The International System of Units (SI)

5.2 Unit symbols

Unit symbols are printed in upright type regardless of the type used in the surrounding text.

 

The US National Institute of Standards and Technology (NIST), with whom Mathsoft used to have some contact, also reflect this in NIST SP 811:

NIST Guide to the SI, Chapter 6: Rules and Style Conventions for Printing and Using Units

6.1.1 Typeface  

Unit symbols are printed in roman (upright) type regardless of the type used in the surrounding text.

 


Then there's asin() instead of arcsin() as well as for cos, tan, cot, sec and csc. And for the hyperbolicus: asinh() should be arsinh() etc.

Agreed.  However, this might be one of those cases where an option could exist to choose ISO 80000 or the common abbreviated name (as an alias).  Failing all else, the user could define asin, etc in an Area in their default template.

 


What could be improved is to pre-define all (yes  all, from z to Z) prefixes for all SI units.

Definitely agreed.  I've seen several user worksheets where people have defined (standard) multiples of SI units.   So, I think this would have a fair bit of support in the user community.   Again, it's one of those cases where I wonder why it wasn't done in the first place?  Surely the cost saving can't have been that significant?

 

Stuart

Announcements

Top Tags