Custom operator in Mathcad Prime 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 /+ * ?
Solved! Go to Solution.
- Labels:
-
Mathcad Usage
-
Other
- Tags:
- operator
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Built in Prime express 4. The secret is the label
The original mathcad had the capability to use prefix, suffix, and infix notations. Not possible in Prime YET
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Built in Prime express 4. The secret is the label
The original mathcad had the capability to use prefix, suffix, and infix notations. Not possible in Prime YET
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you very much for your help. It is unfortunate that it cannot be applied in the case of Prime.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
But you can name the function // or ||, whichever you like:
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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).
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you very much for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You're welcome.
