Difference between revisions of "A. Creating Arrays (Tables)"

 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 +
[[Category:Arrays]]
 +
 
:An ''Array'' is a collection of values that can be viewed as one or more spreadsheet-like ''Tables''. These terms may be used interchangeably for one or two-dimensional arrays (tables). If an array has more than two dimensions, you must view it as a set of two-dimensional tables. With Analytica’s intelligent Arrays, you can define a variable as an array with as many as fifteen dimensions. You can then use the variable in calculations as easily as if it had been defined as a single number.
 
:An ''Array'' is a collection of values that can be viewed as one or more spreadsheet-like ''Tables''. These terms may be used interchangeably for one or two-dimensional arrays (tables). If an array has more than two dimensions, you must view it as a set of two-dimensional tables. With Analytica’s intelligent Arrays, you can define a variable as an array with as many as fifteen dimensions. You can then use the variable in calculations as easily as if it had been defined as a single number.
 
==Creating an index variable==
 
:Index variables identify every dimension of multidimensional variables; it’s usually best to plan for and create the indexes before defining the arrays.
 
1. Open Car Cost model.ana.<br>
 
2. Drag ‘index node’ icon from the tool palette. Drop it in the diagram.
 
 
<br>
 
[[Image:Index node car cost.jpg]]
 
<br>
 
 
3. Type ‘Car type’ on the index node
 
 
4. Double click ‘Car type’index node to bring up object window.
 
 
[[Image:Car type car cost.jpg]]
 
 
<br>
 
[[Image:Object car type1.1.jpg]]
 
 
<br>
 
5. Type ‘Type of car owned’ in the Description field.
 
 
<br>
 
[[Image:Object car type1.2.jpg]]
 
 
<br>
 
[[Image:List of labels 1.1JPG.jpg]]
 
 
6. Select ‘List of labels’ from the exp pop up menu
 
 
7. Click on the first cell to select it. Type ‘small car’. Press enter. A second cell will appear. Type ‘large car’
 
 
[[Image:List of labels 1.3.jpg]]
 
 
==Creating an array (table)==
 
1. Double click on ‘Maintenance cost’ to open its object window.
 
 
2. Select ‘table’ from the expr popup menu. A question box will appear asking you to replace the current definition. Click ‘ok’.
 
<br>
 
[[Image:Maintenance cost table.jpg]]
 
 
<br>
 
 
==Selecting an array index==
 
1. Select ‘Car type’ in the indexes list. Click ‘move button (>>)’.  Click ‘ok’.
 
[[Image:Indexes.jpg]]
 
 
2. Select the first cell. Enter 1200. Press arrow down to select the next cell. Enter 2400.
 
Click on the check button to accept the values.
 
<br>
 
[[Image:Edit table.jpg]]
 
<br>
 

Latest revision as of 19:38, 18 March 2016


An Array is a collection of values that can be viewed as one or more spreadsheet-like Tables. These terms may be used interchangeably for one or two-dimensional arrays (tables). If an array has more than two dimensions, you must view it as a set of two-dimensional tables. With Analytica’s intelligent Arrays, you can define a variable as an array with as many as fifteen dimensions. You can then use the variable in calculations as easily as if it had been defined as a single number.
Comments


You are not allowed to post comments.