O'Reilly logo

Mathematica Demystified by Jim Hoste

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 5Functions

Even though Mathematica comes with thousands of predefined functions, it is extremely important to know how to define our own functions. While a simple function might be defined in a single line of code, more complicated functions might take dozens of lines assembled together in a Module. In this chapter we’ll see how to define our own functions. We’ll also learn the basics of elementary programming which can be used to turn any mathematical algorithm into a working Mathematica function.

5.1 Defining Functions

Sometimes we may be using the same function over and over again and it can be handy to give the function a name. For example, suppose we were computing things related to home mortgages and repeatedly found ourselves computing ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required