Skip to main content
3-Newcomer
Jan 18, 2025 1:04 PM UTC
Solved

Custom operator in Mathcad Prime 10

Hi,

In electronics, we use an operator for the parallel connection of resistors. For example: R1 || R2 which means (R1*R2)/(R1+R2). How is it possible to create an operator like this so that I can use it just like basic operators such as /+ * ?

23-Emerald I
Jan 18, 2025 5:58 PM UTC

Built in Prime express 4.  The secret is the label

Fred_Kohlhepp_0-1737223101622.png

The original mathcad  had the capability to use prefix, suffix, and infix notations.  Not possible in Prime YET

 

6 replies

23-Emerald I
Jan 18, 2025 5:58 PM UTC

Built in Prime express 4.  The secret is the label

Fred_Kohlhepp_0-1737223101622.png

The original mathcad  had the capability to use prefix, suffix, and infix notations.  Not possible in Prime YET

 

Translate
3-Newcomer
Jan 19, 2025 8:49 AM UTC

Thank you very much for your help. It is unfortunate that it cannot be applied in the case of Prime.

Translate
23-Emerald V
Jan 19, 2025 2:49 PM UTC

But you can name the function // or ||, whichever you like:

LucMeekes_0-1737297972850.png

To enter the function name type a double quote (  "  ) and in the placeholder type the slashes //, or the vertical bars ||, then delete the closing quote. Then you can type the bracket ( followed by the parameters and : to enter the expression.

 

Success!
Luc

Translate
14-Alexandrite
Jan 21, 2025 5:48 PM UTC

You can create an R1||R2 function, with the parallel lines in the middle, by following these steps:

1.  Type the double quote mark " to get "".

2.  Inside the double quotes, type the function name R1||R2.  The vertical line is the shifted character on the backslash key, and you need two of them.

3.  With the cursor between the R2 and the second double quote, hit Delete which will convert the text string to math.

4.  Type a left parenthesis ( to get ().

5.  Type your list of variables inside the parentheses.  At this point, it should look like R1||R2(R1,R2).

6.  Type : to get :=

7.  Type the function definition, either your version or Fred's (I'm a civil engineer, not an electrical engineer, but I took two years of electronics in high school and an introductory electrical engineering course in college.  I have always been partial to the harmonic mean version that Fred used).

Parallel Resistors.jpg

I have also attached for your use the Prime 9.0 worksheet that this image is from.  Every time you want to invoke this function, it will be easier to copy it than to retype it.

 

 

Translate
3-Newcomer
Jan 21, 2025 8:51 PM UTC

Thank you very much for your help!

Translate
14-Alexandrite
Jan 22, 2025 5:24 PM UTC

You're welcome.

Translate