Category Archive for: Programming

Programming examples

With only ten buttons on the Programming Palette, Mathcad’s programming environment is easy to use. Nevertheless, this simplicity conceals a surprising amount of programming power. When combined with Mathcad’s rich numerical and symbolic functionality and used in conjunction with the abstract data structures provided by Mathcad’s nested arrays, these ten operators enable you to write sophisticated programs in Mathcad. The…

Read More →

Programs within programs

The examples in previous sections have been chosen more for their simplicity than their power. This section shows some examples of more complicated programs capable of performing tasks that would be difficult if not impossible without the availability of these programming features. Much of the flexibility inherent in programming arises from the ability to embed programming structures inside one…

Read More →

Controlling program execution

The Programming Palette in Mathcad Professional includes three statements for controlling program execution: • Use the break statement within the body of the program to halt execution of the program upon the occurrence of a particular condition. Use break also within a for or while loop to stop the loop and move execution to the next statement outside the…

Read More →

Conditional statements

In general, Mathcad evaluates each statement in your program from the top down. There may be times, however, when you want Mathcad to evaluate a statement only when a particular condition is met. You can do this by including an if statement in your program. Note that the if statement in a Mathcad program is not the same…

Read More →


With Mathcad Professional, you can write your own programs using specialized programming operators. A Mathcad program has many attributes associated with programming languages including conditional branching, looping constructs, local scoping of variables, error handling, the ability to use other programs as subroutines, and the ability to call itself recursively. Mathcad programs make it easy to do tasks that…

Read More →

Back to Top