Abstract
An essential aspect of computer programs is their ability to make decisions—to proceed differently depending upon properties of the data they are operating upon. In this chapter, we explore two different ways of building decision-making into Mathematica programs: multiclause definitions, in which a function is defined by more than one rule; and conditional functions, which return one of several values depending upon a condition. These features will greatly expand what we can do with Mathematica; they are also a crucial step toward learning the basic techniques of recursion and iteration.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 1996 Springer-Verlag New York, Inc.
About this chapter
Cite this chapter
Gaylord, R.J., Kamin, S.N., Wellin, P.R. (1996). Conditional Function Definitions. In: An Introduction to Programming with Mathematica®. Springer, New York, NY. https://doi.org/10.1007/978-1-4612-2322-1_6
Download citation
DOI: https://doi.org/10.1007/978-1-4612-2322-1_6
Publisher Name: Springer, New York, NY
Print ISBN: 978-1-4612-7502-2
Online ISBN: 978-1-4612-2322-1
eBook Packages: Springer Book Archive