Programming in MuPAD — Procedures
- 170 Downloads
When working with MuPAD, we often deal with situations where the same piece of code will be reused in many parts of our notebook. For example, the code used to solve quadratic equations in the previous chapter could be used to solve many different equations. The major question that arises, then, is whether we will have to type in or copy and paste the quadratic equation code every time we need to use it. Imagine a student having to solve ten or more quadratic equations. Will he need to put the same code in ten different places in his notebook? Certainly, that would look silly. There are much more efficient methods to do it. Do you remember how we declared functions in MuPAD? We had to develop a single declaration for a function and then, every time we needed it, we simply called its name. Like this:
KeywordsInput Parameter Quadratic Equation Global Variable Magic Number Error Message
Unable to display preview. Download preview PDF.