Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Translate the entire conversation x

Custom operator in Mathcad Prime 10

IA_12762388
3-Newcomer

Custom operator in Mathcad Prime 10

Hi,

In electronics, we use an operator for the parallel connection of resistors. For example: R|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 /+ * ?

ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

6 REPLIES 6

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

 

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

LucMeekes
23-Emerald III
(To:IA_12762388)

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

FredLusk
14-Alexandrite
(To:IA_12762388)

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.

 

 

Thank you very much for your help!

FredLusk
14-Alexandrite
(To:IA_12762388)

You're welcome.

Announcements

Top Tags