Intelligent Arrays

Arrays: The value of a variable can be a single number, Boolean, text value, or reference — more generally, an atom — or it can be an array, a collection of such values, viewable as a table with one or more dimensions. Here’s an array with two dimensions.

Chapter11 1.jpg

Indexes: The dimensions of the variable Maintenance_cost are identified by the indexes Car_type and by Year.

Chapter11 2.jpg

Intelligent Arrays: Each index is a separate variable and can be used as a dimension of many arrays. For example, other arrays can be indexed by Car type or Year. The fact that Analytica identifies each dimension by a named index provides the basis for the ease and flexibility with which you can create, calculate with, and display arrays with one or many dimensions. It lets expressions and functions work with arrays just the same way they work with single numbers. They automatically generalize to work with arrays without you having to bother with subscripts and For loops the way you would with other computer languages. We call this set of features Intelligent Arrays™.

Learning key concepts: There are some subtleties to the effective use of Analytica’s Intelligent Arrays. To fully appreciate them, you might find you need to let go of some of your past experience with spreadsheets or programming languages. But, once you grasp the key ideas, they will seem quite simple and natural. Many Analytica users end up thinking that these features are what make Analytica most valuable. We recommend that you start by reading through the Introducing indexes and arrays, which illustrates key concepts and features. You can then refer to the rest of this chapter and the next chapter, Array functions as needed for details.

See Also


You are not allowed to post comments.