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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

incorporate user made method into mathcad

ptc-2927449
2-Explorer

incorporate user made method into mathcad

Hi, Sorry for a basic question. Can someone give me suggestion of how to incorporate user defined function (using mathcad, not other code), into the built-in functions? For example, I have one function with 4 arguments. I want to make it one simple function to recall inside other programs without retyping lengthy lines and without worrying about rearrangement of the parent program. Is it possible? Thanks in advance!
4 REPLIES 4
RichardJ
19-Tanzanite
(To:ptc-2927449)

"YUHONG WANG" wrote:

Hi, Sorry for a basic question. Can someone give me suggestion of how to incorporate user defined function (using mathcad, not other code), into the built-in functions? For example, I have one function with 4 arguments. I want to make it one simple function to recall inside other programs without retyping lengthy lines and without worrying about rearrangement of the parent program. Is it possible? Thanks in advance!

Hi, thanks for your answer. Here is an example: I wrote one long function that taking 4 arguments including an array. The output is another array after the process. Then I need to use this new array for another user defined function. I want to know how to recall the first function in the second one without remake it in situ. Thank you.
RichardJ
19-Tanzanite
(To:ptc-2927449)

Just call it in the second function. So f1(a,b,c,d):a+b^2+c/d f2(a,b,c,d):sin(f1(a,b,c,d))+cos(f1(a,b,c,d)) If one of the arguments is an array then the function may need to be written as a program, but the principle is the same. Richard

Hi, Richard, Thank you. I will try to do it. Since the function is quite big, I did not get it to work like you said. In fact, I tried before. But if the principle works, it is worthy of investing more time then. Best regards, Yuhong
Announcements

Top Tags