Welcome to the second installment of my two-part blog on little-known shortcuts in PTC Mathcad. Last week, I covered some shortcuts that are certainly useful, but, if I’m honest, maybe a bit on the boring side. But I’m really excited about this week. I’ve saved the best for last, I think. Okay, I won’t tarry any longer (you know, I don’t think I’ve ever actually used the word “tarry” before—first time for everything). Let’s dig in!

**Ctrl+M – Insert Matrix**

This may not be a new shortcut for some of you, especially if you are familiar with PTC Mathcad 15 and older. In the legacy PTC Mathcad versions, it was more difficult to insert a matrix. You either had to go to the Matrix Toolbar or press **Ctrl+M**, which would open a dialogue box in which you would enter the dimensions of your matrix. Compare that to PTC Mathcad Prime, where you can either use the Matrices/Tables tab, or just press the left square bracket **[** to create a 1×1 matrix and then just insert rows and columns as you go. PTC Mathcad Prime makes matrix editing/manipulation *much* easier. This makes the **Ctrl+M** shortcut almost useless in Prime—or so I thought. The trouble with using **[** to create a matrix is that it cannot retroactively turn a number into a matrix. What I mean is that if I enter a number or variable or function, but then realize that it actually needs to go inside a matrix, pressing **[** will not enclose that value in matrix brackets because that is the shortcut both to initialize a matrix and also to write vector subscripts. But here is where **Ctrl+M** is a game changer. For the longest time, I thought that retroactively enclosing a value in matrix brackets was impossible, but then discovered that if I press **Space** to scope the variable or number or expression that I want to enclose in a matrix, I can then press **Ctrl+M** to do so!

**Ctrl+Shift+U – Scaling Operator a.k.a. Implicit Multiplication Operator**

If I type “4kg” in PTC Mathcad Prime, I will get the following:

Notice that open circle in between “4” and “kg”? Because variables, units, and constants cannot start with numbers, PTC Mathcad knows that when I type letters after a number, I must be trying to scale whatever variable, unit, or constant I have typed by that number, so it automatically inserts a multiplication operator that is only visible when the region is active—called the Scaling operator or Implicit Multiplication operator. You can, of course, explicitly insert the Multiplication operator, as below:

But to me, that seems to clutter expressions oftentimes. I personally prefer, more often than not, implicit multiplication; it looks cleaner to me. But PTC Mathcad doesn’t automatically insert this invisible operator between variables because it doesn’t know where one variable ends and the next begins. What to do? Am I forced to just use the normal multiplication operator? I thought so before writing this blog, but it turns out that I can just type **Ctrl+Shift+U** to insert the Scaling Operator. Of course, this is not as easy as just typing “4kg” or even “4*kg”, but if you’re like me and you want to avoid, where possible and prudent, the clutter of the multiplication operator, **Ctrl+Shift+U** can really come in handy.

**F5/F9 – Calculate Single Region**

You may have known about this one already, but it took me a while because there’s no button in the UI for calculating a single region. Of course, there’s a button for recalculating the entire worksheet, along with the accompanying keyboard shortcut **Ctrl+F5**. But what if I don’t need to recalculate everything, just one region? All I have to do is click on the region I want to calculate and press **F5** or **F9**, which will then recalculate that region, as well as any related regions (i.e. any regions that depend on the calculation in that particular region).

**Ctrl+J – Convert Word to Programming Keyword**

This is one of my favorites because it removes the need to memorize many other non-intuitive keyboard shortcuts in programming. When using the Programming functionality of PTC Mathcad, there are many keywords (e.g. if, for, while, return), but you can’t simply type them; you must either insert them from the Ribbon or memorize the unique keyboard shortcut for each keyword. Not ideal. But **Ctrl+J** saves you from all of that unnecessary trouble. Simply type the keyword you want and press **Ctrl+J ***regardless of which keyword*, and the typed word will be converted into the appropriate Programming keyword. It’s a lot like using **Ctrl+G** to turn a Latin letter into a Greek letter.

**Ctrl+Q – Cycle Through Labels**

A major enhancement of PTC Mathcad Prime in comparison to legacy PTC Mathcad is the ability to label mathematical elements as variables, units, functions, constants, etc. I won’t get into the benefits here, but it’s a pretty big deal. However, it can be a hassle to have to use your mouse to navigate to the Labels menu every time you want to apply a label to something. Pressing **Ctrl+Q** helps this by allowing you to cycle through label types. This can definitely save time, since you don’t have to use your mouse, but it isn’t the most convenient shortcut either, since you may have to press **Ctrl+Q** multiple times to arrive at the label you want. But that brings me to my last shortcut for today’s blog. Can I get a drumroll, please?

**Ctrl+U – Apply Unit Label**

This is my all-time favorite shortcut (is it weird that I have favorites?) for two reasons: (1) I discovered this shortcut (you won’t find it in any of the documentation, at least not that I’ve seen), and (2) I think it’s the most useful shortcut of any that we’ve talked about so far. This is like magic to me, made all the more mysterious by the fact that it’s not documented anywhere. I’m not even sure how I discovered it. Honestly, I think I just thought, “Wouldn’t it be cool if there were a shortcut to label something as a unit? It could be something like **Ctrl+U**.” And then I tried it, and, lo and behold! it worked. Naturally, that leads to the question, are there shortcuts for all of the label types? All I can say is that if there are, I have yet to find them.

Once again, I hope those were helpful for you all. And if you stumble upon any other secret shortcuts, *please* let us know!

Try out our free for life version PTC Mathcad Express and test out the shortcuts today.

**Quick Links**

Free for life version

90 second videos

Training, live demos, free worksheets

Great article, and finally one that convinces with facts and not with marketing spins.

Totally Agree with your control-J comments – definitely falls into the Really Useful (*) category and makes entering programs so much easier.

—————————–

As for matrices, I like the new method of creating and extending matrices. It makes it cognitively easier to enter small matrices as arguments as it keeps the fingers on the keyboard, which means that it is more likely that nested array arguments will appeal to users (well, one at least user!).

What is really needed to make arrays Really Useful are:

Proper worksheet-level nested array indexing (eg, A[1,2,3 as opposed to A[1[2[3 or A[1[2,3),

The Empty Array … this would simplify many of my worksheets by allowing me to initialize an array to empty and add rows / columns to it without having to handle the special case of the first row to make subsequent stack/augment operations conformable.

Proper Multi-Dimensional Array (MDA) support, eg the ability to create 3D arrays, extract slices, join MDAs, apply functions to MDAs (eg, by scalar expansion of standard functions or application of aggregate functions to one or more dimensions. This would give considerably more flexibility when working on multi-dimensional data sets (eg, temperatures in a 3D grid). I wrote my own library to provide some of these features (It’s not *that* difficult to do) but I found it irritating having to write the indices as function arguments (a vector) rather than using the superior subscript method (Whilst I’m at it, I’d also like tensor superscript notation and the functional active subscript naming convention (eg, Jn(x) rather than J(n,x)).

——————————————-

I’m not sure what the benefits of (Prime) Labels versus (Mathcad) Math Styles is, though. I use Math Styles a lot to help distinguish types of variables, with one style for matrices, function names – especially variant forms or ones that conflict with a built-in function name {I’m too lazy, and far too much of a mathematician rather than programmer, to be bothered with

ExtremelyLongFunctionNameThatHoldGreatSignificanceAndConcealAMyriadOfSubtleties (AMostSignificantAndRevealingArgumentDescription)

when I can just type f(x) and have my variant appear in bold blue}.

I make even greater use of Text Styles – just about every worksheet I write uses them.

Kind Regards,

Stuart

(*) Yes, I read Thomas the Tank Engine stories to my children.

Useful information. Where is Part I?

Glad you enjoyed the post, Andreas! You can find Part I here.