Custom Functions > To Create and Use a Custom Function
  
To Create and Use a Custom Function
1. In the Custom Functions folder of the PTC Mathcad installation directory, create a subfolder for your custom function.
2. Create a custom header file, if necessary, or add the include file mcadincl.h at the top of your C program.
3. Write your function in C code and save the file in the subfolder that you created.
4. Compile and link your custom function.
5. Restart PTC Mathcad.
6. In an open worksheet, type the function name, specify the required arguments, and evaluate.
Additional Information
You can use the sample files in the Custom Functions folder as templates for your function.
PTC Mathcad automatically assigns the Function label to your function.