Difference between revisions of "Arrays and Indexes"

(Created page with "Category:Analytica User Guide <languages /> <translate> Analytica User Guide > Arrays and Indexes Analytica offers powerful features for working with indexes and...")
 
Line 4: Line 4:
 
[[Analytica User Guide]] > [[Arrays and Indexes]]
 
[[Analytica User Guide]] > [[Arrays and Indexes]]
  
Analytica offers powerful features for working with indexes and arrays, with one, two, or many dimensions. Collectively, we refer to them as Intelligent Arrays™. This chapter provides an extended introduction to the essential concepts, followed by more details on:
+
Analytica offers powerful features for working with indexes and arrays, with one, two, or many dimensions. Collectively, we refer to them as Intelligent Arrays™. This chapter provides an extended introduction to the essential concepts.
 +
 
 +
'''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.
 +
 
 +
[[File:Chapter11 1.jpg]]
 +
 
 +
'''Indexes''': The dimensions of the variable '''Maintenance_cost '''are identified by the indexes '''Car_type''' and by '''Year'''.
 +
 
 +
[[File: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, [[More Array Functions]] as needed for details.
  
 
==Contents of the Analytica User Guide Chapter 11==
 
==Contents of the Analytica User Guide Chapter 11==
 +
* [[Introducing indexes and arrays]]
 +
* [[IF a THEN b ELSE c with arrays]]
 +
* [[Creating an index]]
 +
* [[Functions that create indexes]]
 +
* [[Defining a variable as an edit table]]
 +
* [[Editing a table]]
 +
* [[Splice a table when computed indexes change]]
 +
* [[Subscript and slice of a subarray]]
 +
* [[Choice menus in an edit table]]
 +
* [[Shortcuts to navigate and edit a table]]
  
 
==See Also==
 
==See Also==

Revision as of 11:39, 23 September 2015


Analytica User Guide > Arrays and Indexes

Analytica offers powerful features for working with indexes and arrays, with one, two, or many dimensions. Collectively, we refer to them as Intelligent Arrays™. This chapter provides an extended introduction to the essential concepts.

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, More Array Functions as needed for details.

Contents of the Analytica User Guide Chapter 11

See Also

Using Expressions <- Arrays and Indexes -> More Array Functions
Comments


You are not allowed to post comments.