{ From user Lonnie, Model Chapter_13 at 8-Sep-2014 10:31:50 AM, encoding="ascii" } SoftwareVersion 4.6.0 { System Variables with non-default values: } Time := Sequence( 0, 4 ) Aliases Time: Alias Time1 {!40000|CorrespondenceMethod Time: 1} SampleSize := 25 TypeChecking := 1 Checking := 1 ShowHier := 1 SaveOptions := 2 SaveValues := 0 {!40300|Sys_DomainSelfIndex := 1} {!40400|Sys_AllNullTreatment := 1} {!40300|ProactivelyEvaluate Index: 1} Model Chapter_13 Title: Array functions Description: The examples in this model demonstrate many more of Analytica's built-in functions.~ ~ To easily find a particular example, click the "Outline" button in the tool palette. This displays all the examples in a neat, hierarchical outline. Author: Mike Steele Date: Fri, Dec 22, 1995 11:38 PM SaveAuthor: Lonnie SaveDate: Mon, Sep 8, 2014 10:31 AM DefaultSize: 44,20 DiagState: 2,133,-6,679,633,18 WindState: 1,61,56 FontStyle: Arial, 15 FileInfo: 0,Model Chapter_13,2,2,0,0,W:\Analytica\Example Models\User Guide Examples\Array Function Examples.ana {!40400|Att_clearTypeFonts: 1} Module Create_arrays Title: Functions that Create Arrays Description: The examples in this module demonstrate two functions that create arrays: the Array function and the Table function. They can create the same arrays, but require their parameters in different formats. Author: Mike Steele Date: Sat, Dec 23, 1995 3:03 AM DefaultSize: 44,20 NodeLocation: 128,144,1 NodeSize: 96,23 DiagState: 2,49,80,750,238,19 WindState: 1,80,71 Variable Array_example_1 Title: Array function~ Example 1 Description: Array(I1, I2, ... In, A) assigns a list of indexes, I1, I2, ... In, as the indexes of the array A, with I1 as the index of the outermost dimension, I2 as the second outermost, and so on. The array A must have at least n dimensions.~ ~ Switch the definition view to "expression" view. There is just one index, "Car_type", and three values. Each of the three values correspond to the three values in the "Car_type" index. The the values are enclosed in brackets to indicate they are the elements of the array.~ ~ Compare this example with "Table function Example 1", which generates the same table but has slightly different parameters. Definition: Array(Car_type, [32,34,18]) NodeLocation: 80,96,1 NodeSize: 58,22 WindState: 1,77,71 ValueState: 1,81,72,267,183,0,MIDM Variable Array_example_3 Title: Array function~ Example 3 Description: Array(I1, I2, ... In, A) assigns a list of indexes, I1, I2, ... In, as the indexes of the array A, with I1 as the index of the outermost dimension, I2 as the second outermost, and so on. The array A must have at least n dimensions.~ ~ Switch the definition view to "expression" view. Since there are two indexes, the elements of the array must be listed in nested brackets. Each of the nested brackets correspond to a value in the outermost index, "Car_type". Each of the elements in a nested bracket correspond to a value in the innermost index, "Years".~ ~ This example demonstrates that you can define a nonrectangular array with this function. There is no nested bracket corresponding to the second value of the outermost index. Instead, there is a single value: "13K". This means that each of the four elements corresponding to the second value of the outermost index is "13K". Definition: Array(Car_type, Years, [[8K, 9K, 9.5K, 10K], 13K, [18K,20K,21K,22K]]) NodeLocation: 352,96,1 NodeSize: 58,22 WindState: 1,79,71 ValueState: 1,80,72,372,171,0,MIDM ReformVal: [Years,Car_type] Variable Table_example_1 Title: Table function~ Example 1 Description: "Table(I1, I2, ... In)(u1, u2, ... um)" returns an n-dimensional array indexed by I1, I2, ... In. The second set of parameters, u1, u2, ... um, specify the values in the array.~ ~ Switch the definition view to "expression" view. There is just one index, "Car_type", and three values. Each of the three values correspond to the three values in the "Car_type" index. Notice that the values are not surrounded by brackets. ~ ~ Compare this example with "Array function Example 1", which generates the same table but has slightly different parameters. Definition: Table(Car_type) (32,34,18) NodeLocation: 80,152,1 NodeSize: 59,22 WindState: 1,80,72 ValueState: 1,80,72,265,194,0,MIDM ReformVal: [Years,Car_type] Variable Table_example_2 Title: Table function~ Example 2 Description: "Table(I1, I2, ... In)(u1, u2, ... um)" returns an n-dimensional array indexed by I1, I2, ... In. The second set of parameters, u1, u2, ... um, specify the values in the array.~ ~ Switch the definition view to "expression" view. In this example, there are two indexes with twelve values. Notice that the values are not inside nested brackets. The dimension each value is associated with is determined solely by the order of the dimension parameters and the order of the value parameters.~ ~ Compare this example with "Array function Example 2", which generates the same table but has slightly different parameters. Definition: Table(Car_type,Years)(~ 8K, 7K, 10K, 6K, 9K,~ 10K, 12K, 11K, 14K, 13K ,~ 5K, 8K, 8K, 7K, 10K ~ ) NodeLocation: 216,152,1 NodeSize: 59,22 WindState: 1,78,72 ValueState: 2,92,291,588,275,0,MIDM ReformDef: [Years,Car_type] ReformVal: [Years,Car_type] Variable Array_example_4 Title: Array function~ Example 4 Description: Array(I1, I2, ... In, A) assigns a list of indexes, I1, I2, ... In, as the indexes of the array A, with I1 as the index of the outermost dimension, I2 as the second outermost, and so on. The array A must have at least n dimensions.~ ~ This example demonstrates using the Array function to replace an index of a table by another. Here, the index of "car_type_table", which is "Car_type", is replaced with "Car_model". Notice that this works only if both indexes have the same number of elements! Definition: Array(Car_model, Car_type_table) NodeLocation: 488,96,1 NodeSize: 58,22 WindState: 1,80,72 ValueState: 1,83,72,261,193,0,MIDM ReformVal: [Years,Car_type] Variable Car_type_table Title: Car type table Description: An arbitrary number associated with each of three types of car. Definition: Table(Car_type)(~ 32,34,18) NodeLocation: 488,40,1 NodeSize: 59,22 WindState: 1,78,72 DefnState: 1,40,50,259,188,0,MIDM ValueState: 1,81,72,265,187,0,MIDM ReformDef: [Car_type,Years] ReformVal: [Years,Car_type] Index Car_model Title: Car model Description: Three different car models, arbitrarily chosen for this example. Definition: ['Jetta','Accord','320'] NodeLocation: 656,40,1 NodeSize: 46,20 NodeInfo: 1,1,1,1,1,1,0,,0 WindState: 1,79,72 ValueState: 1,81,72,249,191,0,MIDM Variable Array_example_5 Title: Array function~ Example 1 Description: Array(I1, I2, ... In, A) assigns a list of indexes, I1, I2, ... In, as the indexes of the array A, with I1 as the index of the outermost dimension, I2 as the second outermost, and so on. The array A must have at least n dimensions.~ ~ Switch the definition view to "expression" view. There is just one index, "Car_type", and three values. Each of the three values correspond to the three values in the "Car_type" index. The the values are enclosed in brackets to indicate they are the elements of the array.~ ~ Compare this example with "Table function Example 1", which generates the same table but has slightly different parameters. Definition: Array(Car_type,[32,34,18]) NodeLocation: 80,96,1 NodeSize: 58,22 ValueState: 1,81,72,267,183,0,MIDM Variable Array_example_6 Title: Array function~ Example 2 Description: Array(I1, I2, ... In, A) assigns a list of indexes, I1, I2, ... In, as the indexes of the array A, with I1 as the index of the outermost dimension, I2 as the second outermost, and so on. The array A must have at least n dimensions.~ ~ Switch the definition view to "expression" view. Since there are two indexes, the elements of the array must be listed in nested brackets. There are three nested brackets. Each of these brackets correspond to a value in the outermost index, "Car_type". In each nested bracket, there are five elements. Each of these elements correspond to a value in the innermost index, "Years".~ ~ Compare this example with "Table function Example 2", which generates the same table but has slightly different parameters. Definition: Array(Car_type,Years,[[8K, 7K, 10K, 6K, 9K],[10K,12K,11K,14K, 13K],[5K, 8K, 8K, 7K, 10K]]) NodeLocation: 216,96,1 NodeSize: 58,22 WindState: 2,799,76,476,507 ValueState: 2,82,71,689,363,0,MIDM ReformVal: [Years,Car_type] Variable Array_example_7 Title: Array function~ Example 3 Description: Array(I1, I2, ... In, A) assigns a list of indexes, I1, I2, ... In, as the indexes of the array A, with I1 as the index of the outermost dimension, I2 as the second outermost, and so on. The array A must have at least n dimensions.~ ~ Switch the definition view to "expression" view. Since there are two indexes, the elements of the array must be listed in nested brackets. Each of the nested brackets correspond to a value in the outermost index, "Car_type". Each of the elements in a nested bracket correspond to a value in the innermost index, "Years".~ ~ This example demonstrates that you can define a nonrectangular array with this function. There is no nested bracket corresponding to the second value of the outermost index. Instead, there is a single value: "13K". This means that each of the five elements corresponding to the second value of the outermost index is "13K". Definition: Array( Car_type,Years, [ [8K,7K,10K,6K, 9K],13K, [5K, 8K, 8K, 7K, 10K] ] ) NodeLocation: 352,96,1 NodeSize: 58,22 ValueState: 2,80,72,572,252,0,MIDM ReformVal: [Years,Car_type] Variable Table_example Title: Table function~ Example 1 Description: "Table(I1, I2, ... In)(u1, u2, ... um)" returns an n-dimensional array indexed by I1, I2, ... In. The second set of parameters, u1, u2, ... um, specify the values in the array.~ ~ Switch the definition view to "expression" view. There is just one index, "Car_type", and three values. Each of the three values correspond to the three values in the "Car_type" index. Notice that the values are not surrounded by brackets. ~ ~ Compare this example with "Array function Example 1", which generates the same table but has slightly different parameters. Definition: Table(Car_type) (32, 34, 18) NodeLocation: 80,152,1 NodeSize: 59,22 ValueState: 2,87,302,265,194,0,MIDM ReformVal: [Years,Car_type] Variable Table_example_3 Title: Table function~ Example 3 Description: "Table(I1, I2, ... In)(u1, u2, ... um)" returns an n-dimensional array indexed by I1, I2, ... In. The second set of parameters, u1, u2, ... um, specify the values in the array.~ ~ Examine the table in edit table view. All table values are 0.~ ~ Switch the definition view to "expression" view. The second set of parameters, (u1, u2, ... um), is omitted since all table values are 0. Definition: Table(Car_type,Years) NodeLocation: 352,152,1 NodeSize: 59,22 ValueState: 2,81,71,515,232,0,MIDM ReformDef: [Years,Car_type] ReformVal: [Years,Car_type] Variable Array_example_8 Title: Array function~ Example 4 Description: Array(I1, I2, ... In, A) assigns a list of indexes, I1, I2, ... In, as the indexes of the array A, with I1 as the index of the outermost dimension, I2 as the second outermost, and so on. The array A must have at least n dimensions.~ ~ This example demonstrates using the Array function to replace an index of a table by another. Here, the index of "car_type_table", which is "Car_type", is replaced with "Car_model". Notice that this works only if both indexes have the same number of elements! Definition: Array(Car_model, Car_type_table) NodeLocation: 488,96,1 NodeSize: 58,22 WindState: 2,94,83,530,434 ValueState: 2,83,72,307,193,0,MIDM ReformVal: [Car_model,Undefined] Variable Tip__Table_index_cha Title: Tip: Table index change Definition: Car_type_table[ @car_type = @Car_model ] NodeLocation: 488,152,1 NodeSize: 56,24 ValueState: 2,304,315,416,303,0,MIDM ReformVal: [Car_model,Undefined] Close Create_arrays Module Reducing_funct Title: Reducing Functions Description: The examples in this module demonstrate Analytica's reducing functions. Reducing functions operate across a dimension of an array and return a result that has one dimension less than the number of dimensions of its input array. When applied to an array of n dimensions, a reducing function returns an array that contains n-1 dimensions. Author: Mike Steele Date: Fri, Dec 29, 1995 1:46 AM DefaultSize: 48,24 NodeLocation: 128,200,1 NodeSize: 96,23 NodeInfo: 1,1,1,1,1,1,0,,0 DiagState: 2,1,1,437,868,17 WindState: 1,83,72 Variable Area_example Title: Area function~ Example Description: "Area(R, I, X1, X2)" returns the area (sum of trapezoids) under array R across index I between X1 and X2. If X1 and X2 are not specified, the area is calculated across all of I. This is the total integral; the result has one less dimension than R.~ ~ In this example, the cost of ownership of the different cars from Time 0 to 2 is returned. Definition: Area(Cost_of_ownership, Time, 0, 2) NodeLocation: 88,784,1 NodeSize: 56,24 WindState: 1,82,72 ValueState: 2,83,72,292,117,0,MIDM ReformVal: [Car_type,Undefined] Variable Argmax_example_1 Title: Argmax function~ Example 1 Description: "Argmax(R, I)" returns the corresponding value(s) in index I for which array R has a maximum value.~ ~ In this example, the car type with the highest Miles is returned for each year. This is "Honda" for all the five years. Definition: Argmax(Miles, Car_type) NodeLocation: 88,360,1 NodeSize: 56,31 WindState: 1,83,71 ValueState: 2,79,71,162,194,0,MIDM Variable Argmax_example_2 Title: Argmax function~ Example 2 Description: "Argmax(R, I)" returns the corresponding value(s) in index I for which array R has a maximum value.~ ~ This example demonstrates that you can use the "argmax" function as an "argmin" function. By putting a minus sign before the first parameter "R", argmax returns the corresponding value(s) in index I for which array R has a minimum value.~ ~ In this example, the car type with the lowest Miles is returned for each year. Definition: Argmax(-Miles, Car_type) NodeLocation: 216,360,1 NodeSize: 56,31 WindState: 1,81,72 ValueState: 2,81,71,163,185,0,MIDM Variable Average_function_Ex1 Title: Average function~ Example 2 Description: "Average(X, I)" returns the mean value(s) of all of the elements of array R along the dimension indexed by I. The returned array has the dimensions of array R with index I removed.~ ~ In this example, "Mpg" has just one dimension. So this results in a single number, which is the mean of the mpg values, or 26, 30.and 35. Definition: Average(Mpg) NodeLocation: 216,176,1 NodeSize: 56,31 WindState: 1,82,71 ValueState: 2,81,72,178,124,0,MIDM Variable Average_function_Exa Title: Average function~ Example 1 Description: "Average(X, I)" returns the mean value(s) of all of the elements of array R along the dimension indexed by I. The returned array has the dimensions of array R with index I removed.~ ~ In this example, "Miles" has two dimensions, so the result in an array with one dimension. This array has the average miles for each car_type. Definition: Average(Miles, Years) NodeLocation: 88,176,1 NodeSize: 56,31 WindState: 1,81,72 ValueState: 2,80,72,162,169,0,MIDM Variable Max_function_Example Title: Max function~ Example 3 Description: "Max(X, I)" returns the largest element(s) of array X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ In this example, the largest of the years is returned, or 2009. Definition: Max(Years) NodeLocation: 344,240,1 NodeSize: 56,24 WindState: 1,81,72 ValueState: 2,81,72,182,125,0,MIDM Variable Max_function_Exampl1 Title: Max function~ Example 1 Description: "Max(X, I)" returns the largest element(s) of array X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ In this example, the highest Miles for each car_type is returned. Definition: Max(Miles, Years) NodeLocation: 88,240,1 NodeSize: 56,24 WindState: 1,82,72 ValueState: 2,80,72,309,121,0,MIDM ReformVal: [Car_type,Undefined] Variable Max_function_Exampl3 Title: Max function~ Example 2 Description: "Max(X, I)" returns the largest element(s) of array X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ This example demonstrates how to get the maximum of two numbers. First turn the pair of numbers into an array, then use the array as a parameter to the "max" function. Definition: Max([10,5]) NodeLocation: 216,240,1 NodeSize: 56,24 WindState: 1,81,71 ValueState: 2,80,72,180,126,0,MIDM Variable Min_function_Example Title: Min function~ Example 3 Description: "Min(X, I)" returns the smallest element(s) of array X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ In this example, the smallest of the years is returned, or 2005. Definition: Min(Years) NodeLocation: 344,296,1 NodeSize: 56,24 WindState: 1,81,72 ValueState: 2,81,72,167,120,0,MIDM Variable Min_function_Exampl1 Title: Min function~ Example 1 Description: "Min(X, I)" returns the smallest element(s) of array X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ In this example, the lowest Miles for each car type is returned. Definition: Min(Miles,Years) NodeLocation: 88,296,1 NodeSize: 56,24 WindState: 1,80,71 ValueState: 2,80,72,174,168,0,MIDM Variable Min_function_Exampl2 Title: Min function~ Example 2 Description: "Min(X, I)" returns the smallest element(s) of array X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ This example demonstrates how to get the minimum of two numbers. First turn the pair of numbers into an array, then use the array as a parameter to the "min" function. Definition: Min([10,5]) NodeLocation: 216,296,1 NodeSize: 56,24 WindState: 2,81,72,576,275 ValueState: 2,81,72,171,136,0,MIDM Variable Product_function_Exa Title: Product function~ Example 2 Description: "Product(X, I)" returns the product(s) of all of the elements of X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ Since mpg is a one-dimensional array, this example returns a single number, the product of all the values in mpg, which is 27.3K. Definition: Product(Mpg) NodeLocation: 216,104,1 NodeSize: 56,31 WindState: 1,81,72 ValueState: 2,81,72,188,130,0,MIDM Variable Product_function_Ex1 Title: Product function~ Example 1 Description: "Product(X, I)" returns the product(s) of all of the elements of X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ Since Car_prices is a two-dimensional array, this example returns a one-dimensional array. Each element of this array is the product of Car_prices for all car type for that Year. Definition: Product(Car_prices, Car_type) NodeLocation: 88,104,1 NodeSize: 56,31 WindState: 2,29,278,842,428 ValueState: 2,43,50,421,128,0,MIDM ReformVal: [Years,Undefined] Variable Subindex_example_1 Title: Subindex function~ Example 1 Description: "Subindex(A, U, I)" returns the value of index I corresponding to where array A has value U. If U is a list of values, a list of index values is returned.~ ~ This example returns the car type that had a price of $18K for each year. If no car type had that price for a year, then that year has an null entry. Definition: Subindex(car_prices, 18K, car_type) NodeLocation: 88,576,1 NodeSize: 56,32 WindState: 1,82,72 ValueState: 2,81,72,157,187,0,MIDM Variable Subindex_example_2 Title: Subindex function~ Example 2 Description: "Subindex(A, U, I)" returns the value of index I corresponding to where array A has value U. If U is a list of values, a list of index values is returned.~ ~ This example returns the year when the price was $18K for each car type. If there was no year when a car type had a price of $18K, then that car type has an null entry. Definition: Subindex(car_prices, 18K, years) NodeLocation: 216,576,1 NodeSize: 56,32 WindState: 1,81,72 ValueState: 2,81,72,171,162,0,MIDM Variable Subindex_example_3 Title: Subindex function~ Example 3 Description: "Subindex(A, U, I)" returns the value of index I corresponding to where array A has value U. ~ ~ This example shows that when U is a list of values, an array of index values is returned. This example returns the car types that had a price of $19K and $19K for each year. Definition: Subindex(car_prices, [18K, 19K], car_type) NodeLocation: 344,576,1 NodeSize: 56,32 WindState: 1,81,72 ValueState: 2,83,123,425,152,0,MIDM ReformVal: [Years,Self] Variable Sum_function_Exampl3 Title: Sum function~ Example 2 Description: "Sum(X, I)" returns the sum(s) of all of the elements of X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ Car_price is a two-dimensional array indexed by Years and Car_type. This example returns a one-dimensional array where each element of this array is the sum of all Car_types for each Year. Definition: Sum(Car_prices, Car_type) NodeLocation: 216,40,1 NodeSize: 56,24 WindState: 2,37,371,734,425 ValueState: 2,83,72,470,135,0,MIDM ReformVal: [Years,Undefined] Variable Sum_function_Exampl2 Title: Sum function~ Example 1 Description: "Sum(X, I)" returns the sum(s) of all of the elements of X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ Since cost is a two-dimensional array, this example returns a one-dimensional array. Each element of this array is the sum of all costs for a car type. Definition: Sum(Car_prices, Years) NodeLocation: 88,40,1 NodeSize: 56,24 WindState: 2,82,72,476,247 ValueState: 1,83,72,250,192,0,MIDM Variable Sum_function_Example Title: Sum function~ Example 3 Description: "Sum(X, I)" returns the sum(s) of all of the elements in X along the dimension indexed by I. The returned array has the dimensions of array X with index I removed.~ ~ Since mpg is a one-dimensional array, this example returns a single number, the sum of all the values in mpg, which is 91. Definition: Sum(mpg) NodeLocation: 344,40,1 NodeSize: 56,24 WindState: 1,82,72 ValueState: 2,83,72,185,130,0,MIDM ReformVal: [Years,Undefined] Variable Argmin_function_Exam Title: Argmin function Example Description: "Argmin(R, I)" returns the corresponding value(s) in index I for which array R has a minimum value.~ ~ In this example, the car type with the lowest Miles is returned for each year. This is "Honda" for all the five years. Definition: Argmin(Miles, Car_type) NodeLocation: 88,432,1 NodeSize: 56,32 WindState: 2,94,83,604,353 ValueState: 2,38,41,160,182,0,MIDM Variable CondMin_function_Exa Title: CondMin function Example Description: CondMin(X, cond, I) return the minimum value in X along I that also satisfies the condition, cond.~ ~ This example returns the minimum value of Cost_of_ownership where Time>= 2 for all Car_type. Definition: Condmin(cost_of_ownership, Time >= 2, Time) NodeLocation: 88,504,1 NodeSize: 56,32 ValueState: 2,18,24,171,164,0,MIDM Variable PositionInIndex_func Title: PositionInIndex function Example 1 Description: PositionInIndex(a, x, i) returns the position in index i — that is, a number from 1 to the size of index i — of the last element of array a equal to x; if no element is equal, it returns 0.~ ~ This example returns 3 as the 2 appears on the 2nd and 3rd position of a along index I, and 3rd position is the last occurance of 2. Definition: Index I := ['A' , 'B', 'C'];~ var A := Array(I, [1, 2, 2]);~ PositionInIndex(A, 2, I) NodeLocation: 88,648,1 NodeSize: 56,31 WindState: 2,23,340,661,353 Variable PositionInIndex_fun2 Title: PositionInIndex function Example 3 Description: PositionInIndex(a, x, i) returns the position in index i — that is, a number from 1 to the size of index i — of the last element of array a equal to x; if no element is equal, it returns 0.~ ~ This example returns the index positions of Car_prices along Car_types where the value is 18K for each Year.~ Definition: PositionInIndex(Car_prices, 18K, Car_type) NodeLocation: 344,648,1 NodeSize: 56,31 WindState: 2,94,83,647,398 ValueState: 2,240,251,419,124,0,MIDM ReformVal: [Years,Undefined] Variable PositionInIndex_fun3 Title: PositionInIndex function Example 2 Description: PositionInIndex(a, x, i) returns the position in index i — that is, a number from 1 to the size of index i — of the last element of array a equal to x; if no element is equal, it returns 0.~ ~ This example returns 0 as the 5 does not appear in the array. Definition: Index I := ['A' , 'B', 'C'];~ var A := Array(I, [1, 2, 2]);~ PositionInIndex(A, 5, I) NodeLocation: 216,648,1 NodeSize: 56,31 WindState: 2,23,340,661,353 ValueState: 2,57,44,188,143,0,MIDM Variable A__index_position_ex Title: @ index position Example 1 Description: The position of value x in an index i is the integer n where x is the nth element of i. n is a number between 1 and Size(i).~ ~ This example returns the position of the cars in the car_type index. Definition: @car_type NodeLocation: 88,720,1 NodeSize: 56,31 ValueState: 2,75,76,183,171,0,MIDM Variable A__index_position_E2 Title: @ index position Example 2 Description: The position of value x in an index i is the integer n where x is the nth element of i. n is a number between 1 and Size(i).~ ~ This example returns the position of Honda in the car-type index. Definition: @[car_type = 'Honda'] NodeLocation: 216,720,1 NodeSize: 56,31 ValueState: 2,122,92,186,123,0,MIDM Variable A__index_position_E3 Title: @ index position Example 3 Description: The position of value x in an index i is the integer n where x is the nth element of i. n is a number between 1 and Size(i).~ ~ This example returns the car at position 2 of the Car_type index. Definition: Car_type[@Car_type=2] NodeLocation: 344,720,1 NodeSize: 56,31 ValueState: 2,61,45,211,149,0,MIDM Close Reducing_funct Module Transform_funct Title: Transforming Functions Description: The examples in this module demonstrate Analytica's transforming functions. The result of a transforming function has the same dimensions as its inputs. If the input is one-dimensional, the second parameter to these functions is optional. Author: Mike Steele Date: Fri, Dec 29, 1995 1:46 AM DefaultSize: 48,24 NodeLocation: 128,256,1 NodeSize: 96,23 DiagState: 2,243,21,647,549,17 WindState: 1,81,72 Variable Cumproduct_example Title: Cumproduct function~ Example Description: "Cumproduct(X, I)" returns an array with each element being the product of all of the elements of X along dimension I up to, and including, the corresponding element of X. The second parameter, I, is optional if X is one-dimensional.~ ~ Each element of this example is the product of the prices for each time up to and including that element's time. Definition: Cumproduct(rate_of_inflation, Years) NodeLocation: 96,200,1 NodeSize: 64,31 WindState: 1,82,72 ValueState: 2,82,246,192,186,0,MIDM ReformVal: [Years,Car_type] {!40000|Att_ResultSliceState: [Mpg,2,Car_type,1,Time,1]} Variable Cumulate_example Title: Cumulate function~ Example Description: "Cumulate(X, I)" returns an array with each element being the sum of all of the elements of X along dimension I up to, and including, the corresponding element of X. The second parameter, I, is optional if X is one-dimensional.~ ~ Each element of this example is the sum of the prices for each time up to and including that element's time. Definition: Cumulate(Cost_of_ownership, Time) NodeLocation: 96,56,1 NodeSize: 64,31 WindState: 1,82,72 ValueState: 2,109,278,443,192,0,MIDM ReformVal: [Time,Car_type] {!40000|Att_ResultSliceState: [Car_type,1,Mpg,1,Time,1]} Variable Uncumulate_function_ Title: Uncumulate function~ Example 1 Description: "Uncumulate(X, I)" returns an array with each element being the difference between the corresponding element of X along dimension I and the previous element of X along dimension I. The first element along dimension I is the same as the first element along dimension I in X..~ ~ This example returns a table that shows the increase in the cost of ownership of cars compared to the previous time period. Definition: Uncumulate(Cost_of_ownership,Time) NodeLocation: 96,128,1 NodeSize: 64,31 WindState: 1,78,71 ValueState: 2,15,244,453,162,0,MIDM ReformVal: [Time,Car_type] Variable Integrate_example Title: Integrate function~ Example Description: "Integrate(R, I)" returns the cumulative integral of array R across index I. The integral is computed with the trapezoidal rule of integration. This is not the total integral; the result has the same number of dimensions as R.~ ~ This example returns the integral of the cost of ownership for cars upto that Time. Definition: Integrate(Cost_of_ownership, Time) NodeLocation: 96,320,1 NodeSize: 64,24 WindState: 1,81,72 ValueState: 2,211,48,421,162,0,MIDM ReformVal: [Time,Car_type] Variable Normalize_example Title: Normalize function~ Example Description: "Normalize(R, I)" returns an array that is array R normalized so that the area across index I equals 1.~ ~ This example normalizes the cost of ownership such that the area under the curve is 1. Definition: Normalize(Cost_of_ownership,Time, Time) NodeLocation: 96,384,1 NodeSize: 64,31 WindState: 1,81,72 ValueState: 2,81,72,414,154,0,MIDM ReformVal: [Time,Car_type] NumberFormat: 1,F,4,4,0,0 Variable Rank_example_1 Title: Rank function~ Example 1 Description: "Rank(R, I)" returns an array with the rank values of array R across index I. The smallest value will have a rank of 1, the next smallest will have a rank of 2, and so on.~ ~ Since this example evaluates the rank of a list, the second parameter "I" is unnecessary. A one-dimensional array is returned, indexed by "Years". This array has a value of 1 where "Year" has the smallest value, a value of 2 where "Year" has the second smallest value, and so on. Definition: Rank(Years) NodeLocation: 96,264,1 NodeSize: 64,24 WindState: 1,82,72 ValueState: 2,79,72,158,181,0,MIDM Variable Rank_example_2 Title: Rank function~ Example 2 Description: "Rank(R, I)" returns an array with the rank values of array R across index I. The smallest value will have a rank of 1, the next smallest will have a rank of 2, and so on.~ ~ This example demonstrates how the Rank function works with a multidimensional table. Each car type is given a rank for each year, with the cheapest car in that year given "1" and the most expensive car in that year given "3". Definition: Rank(Car_prices, Car_type) NodeLocation: 240,264,1 NodeSize: 64,24 WindState: 1,82,72 ValueState: 2,83,56,407,142,0,MIDM ReformVal: [Years,Car_type] Variable Cumulate_example__wi Title: Cumulate example with reset Description: "Cumulate(X, I)" returns an array with each element being the sum of all of the elements of X along dimension I up to, and including, the corresponding element of X. The second parameter, I, is optional if X is one-dimensional. The optional reset parameter, an array of boolean values along i, can be used to indicate points along i where you want to restart the cumulation~ ~ Each element of this example is the sum of the prices for each time up to and including that element's time, and resets at Time=2. Definition: Cumulate(Cost_of_ownership, Time, reset:time=2) NodeLocation: 240,56,1 NodeSize: 64,31 ValueState: 2,137,296,410,157,0,MIDM ReformVal: [Time,Car_type] Variable Uncumulate_function1 Title: Uncumulate function~ Example 2 Description: "Uncumulate(X, I)" returns an array with each element being the difference between the corresponding element of X along dimension I and the previous element of X along dimension I. The first element along dimension I can be specified with the optional parameter firstElement.~ ~ This example returns a table that shows the increase in the cost of ownership of cars compared to the previous time period and also sets the first value to 0. Definition: Uncumulate(Cost_of_ownership,Time, 0) NodeLocation: 240,128,1 NodeSize: 64,31 WindState: 2,78,71,558,357 ValueState: 2,117,140,413,162,0,MIDM ReformVal: [Time,Car_type] Variable Rank_function_Exampl Title: Rank function~ Example 3 Description: "Rank(R, I)" returns an array with the rank values of array R across index I. The smallest value will have a rank of 1, the next smallest will have a rank of 2, and so on.~ ~ This example shows how the Rank function handles duplicate values.~ For Type = -1, lowest rank for the duplicate value is returned.~ For Type = 0, mid rank value of the duplicates is returned.~ For Type = 1, highest rank for the duplicate value is returned.~ For Type = NULL, Unique rank value is returned. Definition: Index RankType := [-1,0,1, Null];~ Rank(NumRepairs, carnum, type:Ranktype); NodeLocation: 384,264,1 NodeSize: 64,24 WindState: 1,82,72 ValueState: 2,82,56,582,202,0,MIDM ReformVal: [CarNum,Sys_LocalIndex('RankType')] Variable Rank_function_Examp2 Title: Rank function~ Example 4 Description: "Rank(R, I)" returns an array with the rank values of array R across index I. The smallest value will have a rank of 1, the next smallest will have a rank of 2, and so on.~ ~ This example shows how multi-key rank can be calculated by passing the optional keyIndex parameter to the rank frunction. The rank of the cars by the number of maintenance events using index "maintType" as the keyIndex is returned. Definition: rank(nummaintEvents, CarNum, KeyIndex:maintType); NodeLocation: 528,264,1 NodeSize: 64,24 WindState: 2,82,72,737,399 ValueState: 2,94,44,582,130,0,MIDM ReformVal: [CarNum,Undefined] Close Transform_funct Module Interp_funct Title: Interpolation Functions Description: The examples in this module demonstrate Analytica's two interpolation functions: the Cubicinterp function and the Linearinterp function. Author: Mike Steele Date: Fri, Dec 29, 1995 1:46 AM DefaultSize: 44,20 NodeLocation: 336,88,1 NodeSize: 96,23 NodeInfo: 1,1,0,1,1,1,0,,0 DiagState: 2,413,347,775,423,19 WindState: 1,81,72 Variable Stepinterp_example_1 Title: Stepinterp function~ Example 1 Description: "StepInterp(D, R, X, I)" returns the element or cross-section of array R for which D has the smallest value that is greater than or equal to X. D and R must have a common dimension, I, and the values of D must be in increasing order. ~ ~ This example evaluates to the values in Cost corresponding to the first Year >= 2007.5. Definition: StepInterp(Years, Car_prices, 2007.5 , Years) NodeLocation: 96,120,1 NodeSize: 72,24 WindState: 2,38,49,630,304 ValueState: 2,1254,360,311,146,0,MIDM ReformVal: [Car_type,Undefined] Variable Stepinterp_example_2 Title: Stepinterp function~ Example 2 Description: "StepInterp(D, R, X, I)" returns the element or cross-section of array A for which D has the smallest value that is greater than or equal to X. D and R must have I as a common index, and D must have values are in increasing order. ~ ~ This example demonstrates that two values can be looked up. It evaluates to the values in Cost corresponding to first Year >= 2007 and the first Year >= 2008. Definition: StepInterp(Years, Car_prices, [2007,2008], Years) NodeLocation: 256,120,1 NodeSize: 76,24 WindState: 2,38,11,772,344 ValueState: 2,135,396,322,166,0,MIDM ReformVal: [Car_type,Self] Index Index_a Title: Index_a Definition: ['a','b','c'] NodeLocation: 72,48,1 NodeSize: 44,20 NodeInfo: 1,1,0,1,1,1,0,,0, WindState: 1,79,72 ValueState: 1,78,71,224,192,0,MIDM Aliases: Alias Index_a2, Alias Index_a1 {!40000|Att_PrevIndexValue: ['a','b','c']} Index Index_b Title: Index_b Definition: [1,2,3] NodeLocation: 176,48,0 NodeSize: 44,20 NodeInfo: 1,1,0,1,1,1,0,,0, WindState: 1,78,72 ValueState: 1,78,71,219,194,0,MIDM {!40000|Att_PrevIndexValue: [1,2,3]} Variable Array_s Title: Array_s Definition: Table(Index_a,Index_b)(~ 7,-3,1,~ -4,-1,6,~ 5,0,-2~ ) NodeLocation: 88,192,1 NodeSize: 64,24 WindState: 1,77,71 DefnState: 2,44,164,416,303,0,MIDM ValueState: 2,19,233,369,353,0,MIDM ReformDef: [Index_b,Index_a] ReformVal: [Index_b,Index_a] Variable Cubicinterp_example Title: Cubicinterp function~ Example Description: For each value of X, "Cubicinterp(D, R, X)" finds the closest values in index R and returns the cubic interpolated value between the corresponding values of array D.~ ~ This is how the interpolated values are found in this example:~ 1.) The values closest to 1.5 are found in Array_a. ~ 2.) The corresponding values in Index_b are found. ~ 3.) What is returned is the value interpolated between these corresponding values in Index_b.~ ~ Cubicinterp uses cubic interpolation to find the interpolated value. This means that many values in Index_b are used to find the interpolation, not just the two closest values, as in linear interpolation. Definition: Cubicinterp(Index_b,Array_s,1.5, index_b) NodeLocation: 256,264,1 NodeSize: 76,24 WindState: 2,81,72,729,472 ValueState: 2,60,270,272,173,0,MIDM Variable Linearinterp_example Title: Linearinterp function~ Example Description: For each value of X, "Linearinterp(D, R, X)" finds the two closest values in index D and returns the linearly interpolated value between the corresponding values of array R.~ ~ This is how the interpolated values are found in this example:~ 1.) The two values closest to 1.5 are found in Array_a. ~ 2.) The values in Index_b corresponding to these two values are found. ~ 3.) What is returned is the value interpolated between these two corresponding values in Index_b.~ ~ Linearinterp uses linear interpolation to find the interpolated value. This means just the two closest values are used to find the interpolation, not several nearby values, as in cubic interpolation. Definition: Linearinterp(Index_b, Array_s,1.5, index_b ) NodeLocation: 256,192,1 NodeSize: 76,24 WindState: 1,80,72 ValueState: 2,481,469,328,153,0,MIDM Index Detailed_b Title: Detailed B Definition: Sequence( 1, 3, 0.1 ) NodeLocation: 280,48,1 NodeSize: 44,20 NodeInfo: 1,1,0,1,1,1,0,,0, Variable Cubicinterp_curve Title: CubicInterp Curve Definition: cubicInterp(Index_b,Array_s,Detailed_b,Index_b) NodeLocation: 424,264,1 NodeSize: 60,24 ValueState: 2,221,502,536,352,1,MIDM ReformVal: [Detailed_b,Index_a] Variable Linearinterp_curve Title: LinearInterp Curve Definition: linearInterp(Index_b,Array_s,Detailed_b,Index_b) NodeLocation: 424,192,1 NodeSize: 60,24 ValueState: 2,401,235,367,352,1,MIDM ReformVal: [Detailed_b,Index_a] Variable Stepinterp_curve Title: StepInterp Curve Definition: stepInterp(Index_b,Array_s,Detailed_b,Index_b) NodeLocation: 424,120,1 NodeSize: 60,24 ValueState: 2,40,50,536,352,1,MIDM ReformVal: [Detailed_b,Index_a] Variable Compare_curves Title: Compare All Interp Curves Definition: [CUBICINTERP_CURVE,LINEARINTERP_CURVE,STEPINTERP_CURVE] IndexVals: ['CubicInterp Curve','LinearInterp Curve','StepInterp Curve'] NodeLocation: 576,192,0 NodeSize: 64,24 NodeInfo: 1,1,1,1,1,1,0,0,0,0 ValueState: 2,40,50,675,529,1,MIDM ReformVal: [Detailed_b,Self] {!40000|Att_ResultSliceState: [Index_a,3,Self,1,Detailed_b,1]} Close Interp_funct Module Other_array_funct Title: Other Array Functions Description: The examples in this module demonstrate other functions that work with arrays. Author: Mike Steele Date: Fri, Dec 29, 1995 1:46 AM DefaultSize: 48,24 NodeLocation: 336,200,1 NodeSize: 96,23 DiagState: 2,91,38,415,573,19 WindState: 1,80,72 Variable Maint_costs Title: Maint_costs Units: $ Description: Some arbitrary maintenance costs for three types of cars, to be used in the "Sortindex function Example". Definition: Table(Car_type)(~ 1950,1800,2210) NodeLocation: 112,496,1 NodeSize: 76,24 WindState: 1,80,72 ValueState: 1,79,72,271,193,0,MIDM Variable Sortindex_example Title: Sortindex function~ Example Description: "SortIndex(D)" returns a list containing the elements of D's index, sorted according to D's values (from smallest to largest). D must be a one-dimensional array.~ ~ This example returns a list of three car types ("Car_type" is the index of "Maint_costs"), sorted so that the car type with the lowest maintenance costs is first and the car type with the highest maintenance costs is last. Definition: SortIndex(Maint_costs) NodeLocation: 280,496,1 NodeSize: 76,24 WindState: 1,78,72 ValueState: 1,81,72,303,195,0,MIDM Module Concat_examples Title: Concat function~ Examples Description: "Concat(A1, A2, I, J, K)" returns an array with arrays A1 and A2 joined together across indexes I and J. K is the index of the dimension formed by indexes I and J.~ ~ This submodule includes three examples of the use of this function. Author: Mike Steele Date: Sun, Jan 21, 1996 11:38 PM DefaultSize: 44,20 NodeLocation: 112,104,1 NodeSize: 76,24 DiagState: 2,142,295,424,265,3 WindState: 1,100,89 Index More_years {!40000|Att_PrevIndexValue: [2010,2011,2012]} Title: More_years Description: An index with some more years, to be concatenated with the index "Years". Definition: [2010,2011,2012] NodeLocation: 72,40,1 NodeSize: 48,24 WindState: 1,101,90 ValueState: 1,101,89,245,198,0,MIDM Index All_years Title: All_years Description: When you concatenate two tables with two disjoint indexes, you have to supply an index equivalent to the two disjoint indexes combined.~ ~ In this example, one index has the years 1985 to 1988. The other index has the years 1989 to 1991. So, "All_years" is the combined index with the years 1985 to 1991. Definition: Concat(Years, More_years) NodeLocation: 72,112,1 NodeSize: 48,24 WindState: 1,101,89 ValueState: 1,100,89,237,257,0,MIDM Variable More_prices Title: More_prices Units: $ Description: The prices corresponding to the extra years in the "more_years" index,~ to be concatenated with the "prices" table. Definition: Table(More_years,Car_type)(~ 21K,25K,32K,~ 22K,28K,33K,~ 24K,29K,35K~ ) NodeLocation: 192,40,1 NodeSize: 48,24 WindState: 1,102,89 DefnState: 2,194,532,416,303,0,MIDM ValueState: 2,186,389,343,178,0,MIDM ReformDef: [More_years,Car_type] ReformVal: [More_years,Car_type] Variable Concat_function_Exa3 Title: Concat function~ Example 3 Description: "Concat(A1, A2, I, J, K)" returns an array with arrays A1 and A2 joined together across indexes I and J. K is the index of the dimension formed by indexes I and J.~ ~ In this example, two indexes are concatenated but in a different way than in "Concat function Example 1". The "K" parameter is another index with the same number of elements as "Years" and "More_years" combined. What is created is a one dimensional array indexed by "Sequence2". The values of this array are filled first with the elements of "Years" and then with the elements of "More_years". Definition: Concat(Years, More_years, Years, More_years, Sequence2) NodeLocation: 320,184,1 NodeSize: 56,31 WindState: 1,102,89 ValueState: 1,100,89,274,250,0,MIDM Variable Concat_function_Exa1 Title: Concat function~ Example 1 Description: "Concat(A1, A2, I, J, K)" returns an array with arrays A1 and A2 joined together across indexes I and J. K is the index of the dimension formed by indexes I and J.~ ~ This example demonstrates how to concatenate multidimensional tables. ~ Two caveats to keep in mind:~ ¥ First, the two concatenated tables must have the same indexes, except for the indexes to be concatenated (that is, the indexes specified in the "I" and "J" parameters). In this example, both "car_prices" and "more_prices" are indexed by "car_type".~ ¥ Second, you must supply an index with the same number of elements as the "I" index and "J" index combined. Usually, as in this example, the elements of this index will be the same as in the "I" index and "J" index. Definition: Concat(Car_prices, More_prices, Years, More_years, All_years) NodeLocation: 320,40,1 NodeSize: 56,31 WindState: 2,101,89,576,384 ValueState: 2,44,521,338,247,0,MIDM ReformVal: [Car_type,All_years] Index Sequence2 Title: Sequence2 Description: This is an index of seven arbitrary numbers to be used as the index for the array created in "Concat function Example 2". It is critical that this index have the same number of elements as the "Years" index and "More_years" index combined. Read the description for "Concat function Example 2" to find out why. Definition: Sequence( 1, 8 ) NodeLocation: 72,184,1 NodeSize: 48,24 WindState: 1,101,90 ValueState: 1,99,89,239,249,0,MIDM Variable Concat_function_Exa2 Title: Concat function~ Example 2 Description: "Concat(A1, A2, I, J, K)" returns an array with arrays A1 and A2 joined together across indexes I and J. K is the index of the dimension formed by indexes I and J.~ ~ This example demonstrates nested usage of Concat which results in a .K local index.~ Miles is first concatenated with ' ' and the result is then concatenated with Car_prices. Definition: Concat(Car_prices,Concat(' ', Miles, ,Years),Years) NodeLocation: 320,112,1 NodeSize: 56,31 WindState: 1,101,89 ValueState: 2,44,521,846,331,0,MIDM ReformVal: [Sys_LocalIndex('K'),Car_type] Close Concat_examples Variable Subset_Example_2 Title: Subset Example 2 Description: "Subset(D)" returns a list containing the elements of D's index for which D has a true (that is, non-zero) value. D must be a one-dimensional array. The optional parameter position: true can be specified to return the position along D's index instead of D's values.~ ~ This example returns the positions along All_years index for which the index values are greater than 2007 and less than 2010, i.e. 3 and 4. Definition: Subset(All_Years>2007 and All_years<2010, position:true) NodeLocation: 280,440,1 NodeSize: 76,24 WindState: 2,74,308,476,224 ValueState: 2,337,403,416,303,0,MIDM Variable Subset_Example_1 Title: Subset Example 1 Description: Subset(d) returns the subset of d’s index values that correspond to true values in d. ~ ~ This basic use cannot be employed when d has more than one dimension, that is, it does not array abstract. The optional parameters i and resultIndex provide an array-abstractable form that can be applied to multi-dimensional arrays, where the parameter i specifies the index to take the subset over, and resultIndex specifies the index for the final result. Definition: Subset(Miles > 8000,i:Car_type,resultindex:Car_type) NodeLocation: 112,440,1 NodeSize: 76,24 ValueState: 2,467,326,416,303,0,MIDM ReformVal: [Years,Car_type] Module Aggregate_function_E Title: Aggregate function Examples Author: abhay Date: Wed, Oct 27, 2010 12:05 PM DefaultSize: 48,24 NodeLocation: 112,48,1 NodeSize: 80,24 Index Period Title: Period Definition: ['Early','Middle','Late'] NodeLocation: 96,56,1 NodeSize: 48,24 Variable Time2Period Title: Time2Period Description: A mapping from Time index to Period Index. Definition: Table(Time)(~ 'Early','Middle','Middle','Late','Late') NodeLocation: 224,56,1 NodeSize: 48,24 Variable Aggregate_Example_1 Title: Aggregate Example 1 Description: Aggregate(x,map,i,targetIndex) converts from an array x indexed by fine-grain index i, to an array indexed by the coarser-grained index targetIndex. By default, the values mapping to the same target position are aggregated by summing them.~ ~ In this example Cost_of_osnership, indexed by Time(fine-grain index), is aggregated using the map Time2Period to the index Period(coarser-grain index) by summing values mapping to the same target position. Definition: Aggregate(Cost_of_ownership, Time2Period, Time, Period ) NodeLocation: 96,120,1 NodeSize: 48,24 WindState: 2,127,402,476,583 ValueState: 2,456,657,278,151,0,MIDM ReformVal: [Period,Car_type] Variable Aggregate_Example_2 Title: Aggregate Example 2 Description: Aggregate(x,map,i,targetIndex) converts from an array x indexed by fine-grain index i, to an array indexed by the coarser-grained index targetIndex. By default, the values mapping to the same target position are aggregated by summing them.~ ~ In this example Cost_of_osnership, indexed by Time(fine-grain index), is aggregated using the map Time2Period to the index Period(coarser-grain index) by taking the average of the values mapping to the same target position. Definition: Aggregate(Cost_of_ownership,Time2Period,Time,Period,type:'Average') NodeLocation: 224,120,1 NodeSize: 48,24 WindState: 2,94,83,621,363 ValueState: 2,174,658,292,148,0,MIDM ReformVal: [Period,Car_type] Close Aggregate_function_E Variable ConcatRows_Example_1 Title: ConcatRows Example 1 Description: ConcatRows(a, rowIndex, colIndex, concatIndex) takes an array, a indexed by rowIndex and colIndex, and concatenates each row, flattening the array by eliminating the row dimension.~ ~ This example concatenates the rows of the table Car_prices flattenning it out. Definition: ConcatRows(Car_prices, Car_Type, Years) NodeLocation: 112,160,1 NodeSize: 76,24 ValueState: 2,12,331,916,303,0,MIDM ReformVal: [Sys_LocalIndex('ConcatIndex'),Undefined] Variable IndexNames_Example_1 Title: IndexNames Example 1 Description: IndexNames(a) returns a list of the identifiers of the indexes of the array a as text values. Definition: IndexNames (Car_prices) NodeLocation: 112,216,1 NodeSize: 76,24 Variable IndexesOf_Example_1 Title: IndexesOf Example 1 Description: Returns a list of the indexes of the array a as handles. Definition: IndexesOf(Car_prices) NodeLocation: 112,272,1 NodeSize: 76,24 Module IndexValue_Examples Title: IndexValue Examples Description: ~ ~ ~ Author: abhay Date: Wed, Oct 27, 2010 12:05 PM DefaultSize: 48,24 NodeLocation: 112,328,1 NodeSize: 76,24 DiagState: 2,165,122,550,300,19 Variable Cubes Title: Cubes Definition: [1, 2, 3, 4] ^3 NodeLocation: 88,56,1 NodeSize: 48,24 {!40000|Att_PrevIndexValue: [1,2,3,4]} Variable IndexValue_Example_1 Title: IndexValue Example 1 Description: IndexValue(i) returns the index value for variables that have both n index value and a result value.~ ~ Cubes is a self indexede array with index values [1, 2, 3] and result values [1, 4, 9]. This example shows that the IndexValue function returns the index values of Cubes. Definition: IndexValue(Cubes) NodeLocation: 224,56,1 NodeSize: 56,24 ValueState: 2,272,403,416,303,0,MIDM Variable Colors Title: Colors Definition: Table(Cubes,Self)(~ 1,2,3,~ 4,5,6,~ 7,8,9,~ 10,11,12) IndexVals: ['Red','Green','Blue'] NodeLocation: 88,128,1 NodeSize: 48,24 WindState: 2,219,328,476,224 DefnState: 2,160,444,416,303,0,MIDM ValueState: 2,120,123,416,303,0,MIDM ReformDef: [Self,Cubes] ReformVal: [Self,Cubes] {!40000|Att_PrevIndexValue: ['Red','Green','Blue']} Variable IndexValue_Example_2 Title: IndexValue Example 2 Description: IndexValue(i) returns the index value for variables that have both n index value and a result value.~ ~ Table Colors is indexed by Cubes and Color's self index. This example demonstrates that IndexValue returns the self index values of Colors i.e. [Red, Green, Blue]. Definition: IndexValue(Colors) NodeLocation: 224,128,1 NodeSize: 56,24 ValueState: 2,272,403,416,303,0,MIDM Close IndexValue_Examples Module Size_Examples Title: Size Examples Author: abhay Date: Wed, Oct 27, 2010 4:40 PM DefaultSize: 48,24 NodeLocation: 112,384,1 NodeSize: 76,24 DiagState: 2,88,349,466,188,17 Variable Size_example_1 Title: Size function~ Example 1 Description: "Size(U)" returns the number of elements in U.~ ~ This example returns the number of years included in the "Years" index, or 5. Definition: Size(Years) NodeLocation: 100,48,1 NodeSize: 52,24 WindState: 1,80,72 ValueState: 1,82,72,264,164,0,MIDM Variable Size_example_2 Title: Size function~ Example 2 Description: "Size(U)" returns the number of elements in U.~ ~ This example just returns the number of elements in the "Car_prices" array, or 15. Definition: Size(Car_prices) NodeLocation: 220,48,1 NodeSize: 52,24 WindState: 1,80,73 ValueState: 1,81,72,258,174,0,MIDM Variable Size_example_3 Title: Size function~ Example 3 Description: "Size(U)" returns the number of elements in U.~ ~ This example shows that the "size" of a scalar number is just 1. Definition: Size(10) NodeLocation: 340,48,1 NodeSize: 52,24 WindState: 1,78,72 ValueState: 1,81,71,264,168,0,MIDM Variable Size_function_Exampl Title: Size function~ Example 4 Description: "Size(U)" returns the number of elements in U.~ ~ This example shows that the "size" of a scalar number is just 1. Definition: Size([]) NodeLocation: 100,112,1 NodeSize: 52,24 WindState: 1,78,72 ValueState: 1,81,71,264,168,0,MIDM Variable Size_function_Examp3 Title: Size function~ Example 5 Description: "Size(U)" returns the number of elements in U.~ ~ This example shows that the "size" of a scalar number is just 1. Definition: Size([Years, Car_prices]) NodeLocation: 220,112,1 NodeSize: 52,24 WindState: 1,78,72 ValueState: 1,81,71,264,168,0,MIDM Variable Size_function_Examp1 Title: Size function~ Example 6 Description: "Size(U)" returns the number of elements in U.~ ~ This example shows that the "size" of a scalar number is just 1. Definition: Size([Years, Car_prices], listLen:true) NodeLocation: 340,112,1 NodeSize: 52,24 WindState: 1,78,72 ValueState: 1,81,71,264,168,0,MIDM Close Size_Examples Close Other_array_funct Module Matrix_funct Title: Matrix Functions Description: The examples in this module demonstrate Analytica's matrix functions. In Analytica, a matrix is defined as a two-dimensional array of numbers with indexes of equal length. Author: Mike Steele Date: Fri, Dec 29, 1995 1:46 AM DefaultSize: 44,20 NodeLocation: 336,256,1 NodeSize: 96,23 DiagState: 2,29,11,610,597,17 WindState: 1,80,71 Index I Title: i Description: Some arbitrary numbers for indexing MatrixA. Definition: [1,2,3] NodeLocation: 80,104,1 NodeSize: 44,20 WindState: 1,79,72 ValueState: 1,81,71,223,190,0,MIDM {!40000|Att_PrevIndexValue: [1,2,3]} Index J1 Title: j Description: Some arbitrary letters for indexing MatrixA. Definition: ['a','b','c'] NodeLocation: 80,160,1 NodeSize: 44,20 WindState: 1,79,72 ValueState: 1,79,72,237,186,0,MIDM {!40000|Att_PrevIndexValue: ['a','b','c']} Variable Matrixa Title: MatrixA Description: A 3x3 matrix filled with arbitrary numbers. Definition: Table(I,J1)(~ 4,2,3,~ 1,5,2,~ 2,3,7) NodeLocation: 192,248,0 NodeSize: 44,20 WindState: 1,79,72 DefnState: 2,678,231,416,303,0,MIDM ValueState: 2,343,175,335,189,0,MIDM ReformDef: [I,J1] ReformVal: [I,J1] Variable Determinant_example Title: Determinant function~ Example Description: "Determinant(C, I, J)" returns the determinant of matrix C along dimensions I and J. Dimensions I and J must be indexes of equal length. Definition: Determinant(Matrixa,I,J1) NodeLocation: 360,312,1 NodeSize: 64,28 WindState: 1,81,72 ValueState: 2,80,72,420,223,0,MIDM Variable Invert_example Title: Invert function~ Example Description: "Invert(C, I, J)" returns the inversion of matrix C along dimensions I and J. Dimensions I and J must be indexes of equal length. Definition: Invert(Matrixa,I,J1) NodeLocation: 360,248,1 NodeSize: 64,28 WindState: 1,79,72 ValueState: 2,106,130,418,250,0,MIDM ReformVal: [I,J1] NumberFormat: 1,F,4,3,0,0 Variable Transpose_example Title: Transpose function~ Example Description: "Transpose(C, I, J)" returns the transposed of matrix C along dimensions I and J. Dimensions I and J must be indexes of equal length. Definition: Transpose(Matrixa,I,J1) NodeLocation: 360,184,1 NodeSize: 64,28 WindState: 1,79,72 ValueState: 2,300,152,328,142,0,MIDM ReformVal: [I,J1] Index K1 {!40000|Att_PrevIndexValue: ['l','m','n']} Title: k Description: Some arbitrary letters for indexing MatrixB. Definition: ['l','m','n'] NodeLocation: 80,216,1 NodeSize: 44,20 ValueState: 1,79,72,237,186,0,MIDM Variable Matrixb Title: MatrixB Description: A 3x3 matrix filled with arbitrary numbers.. Definition: Table(I,K1)(~ 3,2,4,~ 2,5,1,~ 1,3,2~ ) NodeLocation: 192,120,0 NodeSize: 44,20 DefnState: 1,136,146,271,142,0,MIDM ValueState: 2,416,359,335,189,0,MIDM ReformDef: [I,K1] ReformVal: [I,K1] Variable Dot_product_example Title: Dot product Example Description: This is an example of taking the dot product between two matrices. Note that they must share a common index. Definition: Sum(Matrixa*Matrixb,i) NodeLocation: 360,56,1 NodeSize: 64,28 ValueState: 2,234,222,310,174,0,MIDM ReformVal: [J1,K1] Index L Title: l Description: An index (1 to 5) for MatrixS. Definition: Sequence(1,5) NodeLocation: 80,272,1 NodeSize: 44,20 {!40000|Att_PrevIndexValue: [1,2,3,4,5]} Index M1 Title: m Description: An index (1 to 5) for MatrixS. Definition: Sequence(1,5) NodeLocation: 80,328,1 NodeSize: 44,20 ValueState: 2,247,436,416,303,0,MIDM {!40000|Att_PrevIndexValue: [1,2,3,4,5]} Variable Matrixs Title: MatrixS Description: This is an example of a symmetric, positive-definite matrix. Definition: Table(L,M1)(~ 6,2,6,3,1,~ 2,4,3,1,3,~ 6,3,9,3,4,~ 3,1,3,8,4,~ 1,3,4,4,7~ ) NodeLocation: 200,376,0 NodeSize: 44,20 ValueState: 2,73,366,399,174,0,MIDM ReformDef: [M1,L] ReformVal: [M1,L] Variable Decomp Title: Decompose function Example Description: Decompose returns a lower diagonal matrix. Definition: Decompose(Matrixs,L,M1) NodeLocation: 360,376,1 NodeSize: 64,28 ValueState: 2,104,1,522,204,0,MIDM ReformVal: [M1,L] NumberFormat: 3,F,4,4,0,0,4,0,$,0,"h:mm:ss tt",0,"TIME",,0,0 Module Verification_of_deco Title: Verification of Decompose Example Description: This module shows the verification of the decompose example: The dot product of the decomposition and its transpose return the original matrix, MatrixS. Author: lynda Date: Mon, Jan 29, 1996 3:06 PM DefaultSize: 48,24 NodeLocation: 520,376,0 NodeSize: 64,28 DiagState: 2,429,214,435,195,17 Variable Transp Title: Transpose it Description: Returns the transpose of the decompose example. Definition: Transpose(Decomp,L,M1) NodeLocation: 64,48,1 NodeSize: 48,24 ValueState: 2,105,192,416,303,0,MIDM ReformVal: [M1,L] Variable Dot_product Title: Dot product Description: We take the dot product of the 2 reindexed matrices, to obtain the original matrix. Definition: Sum(Reindex_d*Reindex_t,Dummy) NodeLocation: 312,48,1 NodeSize: 48,24 WindState: 1,196,239 ValueState: 2,493,145,399,174,0,MIDM ReformVal: [M1,L] Index Dummy Title: Dummy Description: This is a dummy index, used to perform the dot product of the matrices. Definition: [1,2,3,4,5] NodeLocation: 64,112,1 NodeSize: 48,24 Variable Reindex_d Title: Reindex Decompose Description: Here we provide a dummy index for the Decomposed matrix, so we can later take the dot product. Definition: Array(L,Dummy,Decomp) NodeLocation: 184,112,1 NodeSize: 52,24 ValueState: 1,212,285,399,174,0,MIDM ReformVal: [Dummy,L] Variable Reindex_t Title: Reindex Transpose Description: Here we provide a dummy index for the Transposed matrix, so we can later take the dot product. Definition: Array(Dummy,M1,Transp) NodeLocation: 184,48,1 NodeSize: 48,24 WindState: 1,88,233 ValueState: 2,102,387,448,205,0,MIDM ReformVal: [M1,Dummy] Close Verification_of_deco Module MatrixMultiply_Examp Title: MatrixMultiply Example Author: abhay Date: Wed, Oct 27, 2010 4:40 PM DefaultSize: 48,24 NodeLocation: 360,120,1 NodeSize: 64,28 DiagState: 2,129,209,689,300,17 Index index1 {!40000|Att_PrevIndexValue: [1,2]} Title: index1 Definition: [1, 2] NodeLocation: 72,64,1 NodeSize: 48,24 Index index2 {!40000|Att_PrevIndexValue: [1,2]} Title: index2 Definition: [1, 2] NodeLocation: 184,64,1 NodeSize: 48,24 Index index3 {!40000|Att_PrevIndexValue: ['a','b','c']} Title: index3 Definition: ['a', 'b', 'c'] NodeLocation: 296,64,1 NodeSize: 48,24 Variable C Title: C Definition: Table(index1,index2)(~ 1,2,~ 1,0~ ) NodeLocation: 120,136,1 NodeSize: 48,24 ReformDef: [index2,index1] Variable D Title: D Definition: Table(index2,index3)(~ 3,0,1,~ 0,1,1~ ) NodeLocation: 240,136,1 NodeSize: 48,24 ReformDef: [index3,index2] Variable MatrixMultiply_Exam1 Title: MatrixMultiply Example Description: MatrixMultiply(a, aRow, aCol, b, bRow, bCol) performs a matrix multiplication on matrix a, having indexes aRow and aCol, and matrix b, having indexes bRow and bCol. The result is indexed by aRow and bCol. a and b must have the specified two indexes, and can also have other indexes. bCol and bRow must have the same length or it flags an error. If bRow and bCol are the same index, it returns only the diagonal of the result.~ ~ This example returns the result of multiplying matrices C and D with the common index index2.~ ~ ~ Definition: MatrixMultiply(C, index1, index2, D, index2, index3) NodeLocation: 176,208,1 NodeSize: 52,24 ValueState: 2,260,365,416,303,0,MIDM ReformVal: [index3,index1] Close MatrixMultiply_Examp Module EigenDecomp_Example1 Title: EigenDecomp Example Author: abhay Date: Wed, Oct 27, 2010 4:40 PM DefaultSize: 48,24 NodeLocation: 360,440,1 NodeSize: 64,28 DiagState: 2,119,143,550,300,17 Index stock1 Title: stock1 Definition: ['INTC','MOT','AMD'] NodeLocation: 112,72,1 NodeSize: 48,24 {!40000|Att_PrevIndexValue: ['INTC','MOT','AMD']} Index stock2 Title: stock2 Definition: ['INTC','MOT','AMD'] NodeLocation: 232,72,1 NodeSize: 48,24 {!40000|Att_PrevIndexValue: ['INTC','MOT','AMD']} Variable Covariance1 Title: Covariance1 Definition: Table(stock1,stock2)(~ 30.47,13.26,18.9,~ 13.26,16.58,14.67,~ 18.9,14.67,17.11~ ) NodeLocation: 168,144,1 NodeSize: 56,24 DefnState: 2,82,285,416,303,0,MIDM ValueState: 2,32,43,416,303,0,MIDM ReformDef: [stock2,stock1] ReformVal: [stock1,stock2] Variable EigenDecomp_Example Title: EigenDecomp Example Definition: EigenDecomp(Covariance1, stock1, stock2) NodeLocation: 168,224,1 NodeSize: 64,24 ValueState: 2,700,415,416,194,0,MIDM ReformVal: [stock2,Sys_LocalIndex('item')] Variable Va1 Definition: #EigenDecomp_Example[.item='vector'] * EigenDecomp_Example[.item='value'] NodeLocation: 296,224,1 NodeSize: 48,24 ValueState: 2,254,388,416,303,0,MIDM ReformVal: [stock1,stock2] Variable Va2 Definition: MatrixMultiply(Covariance1, Stock1,stock2, #EigenDecomp_Example[.item='vector'], stock1) NodeLocation: 296,144,1 NodeSize: 48,24 ValueState: 2,237,668,416,303,0,MIDM ReformVal: [stock1,stock2] Variable Va3 Definition: va1-va2 NodeLocation: 424,192,1 NodeSize: 48,24 ValueState: 2,212,551,416,303,0,MIDM ReformVal: [stock1,stock2] Close EigenDecomp_Example1 Index J2 Title: J2 Definition: CopyIndex(J1) NodeLocation: 80,384,1 NodeSize: 44,20 Variable SingularValueDecomp_ Title: SingularValueDecomp Example Description: SingularValueDecomp() (singular value decomposition) is often used with sets of equations or matrices that are singular or ill-conditioned (that is, very close to singular). It factors a matrix a, indexed by i and j, with Size(i)>=Size(j), into three matrices, U, W, and V, such that: ~ a = U . W . V Definition: SingularValueDecomp(MatrixA, I, J1, J2) NodeLocation: 360,504,1 NodeSize: 64,28 ValueState: 2,303,445,416,145,0,MIDM Variable U Title: U Definition: #SingularValueDecomp_[SvdIndex='U'] NodeLocation: 504,432,1 NodeSize: 44,20 ValueState: 2,144,155,312,174,0,MIDM ReformVal: [I,J1] Variable W Title: W Definition: #SingularValueDecomp_[SvdIndex='W'] NodeLocation: 504,480,1 NodeSize: 44,20 ValueState: 2,160,171,288,157,0,MIDM ReformVal: [J1,J2] Variable V Title: V Definition: #SingularValueDecomp_[SvdIndex='V'] NodeLocation: 504,528,1 NodeSize: 44,20 ValueState: 2,176,187,293,165,0,MIDM ReformVal: [J1,J2] Close Matrix_funct Module Input_variables Title: Input Variables Author: lynda Date: Mon, Jan 29, 1996 12:50 PM DefaultSize: 48,24 NodeLocation: 232,376,0 NodeSize: 72,16 DiagState: 2,65,458,618,395,17 NodeColor: -1,-26215,26214 Index Car_type Title: Car_type Description: A list of three sample car models.~ Used as an index for many of the examples in this model. Definition: ['VW','Honda','BMW'] NodeLocation: 80,40,1 NodeSize: 48,24 NodeInfo: 1,1,1,1,1,1,0,,0 WindState: 1,60,56 ValueState: 1,61,57,236,191,0,MIDM {!40000|Att_PrevIndexValue: ['VW','Honda','BMW']} Index Years Title: Years Description: A list of four sample years.~ Used as an index for many of the examples in this model. Definition: [2005,2006,2007,2008,2009] NodeLocation: 80,96,1 NodeSize: 48,24 WindState: 1,64,56 ValueState: 1,62,56,218,206,0,MIDM {!40000|Att_PrevIndexValue: [2005,2006,2007,2008,2009]} Index Mpg {!40000|Att_PrevIndexValue: [26,30,35]} Title: Mpg Units: mpg Description: A list of three sample fuel efficiencies for cars.~ Used as an index for many of the examples in this model. Definition: [26,30,35] NodeLocation: 80,320,1 NodeSize: 48,24 WindState: 1,61,56 ValueState: 1,61,57,222,191,0,MIDM Variable Cost Title: Cost Units: $ Description: Prices for three different car models with three different fuel efficiencies. Definition: Table(Mpg,Car_type)(~ 2185,2810,3435,~ 1705,2330,2955,~ 1585,2210,2835~ ) NodeLocation: 360,152,1 NodeSize: 56,24 WindState: 1,62,56 ValueState: 2,310,569,331,172,0,MIDM ReformDef: [Car_type,Mpg] ReformVal: [Mpg,Car_type] Variable Car_prices Title: Car_prices Units: $ Description: Prices for three different car models in five different years. Definition: Table(Years,Car_type)(~ 16K,18K,25K,~ 17K,19K,26K,~ 18K,20K,28K,~ 19K,22K,30K,~ 20K,24K,32K~ ) NodeLocation: 216,40,1 NodeSize: 56,24 WindState: 1,59,56 DefnState: 2,72,98,416,303,0,MIDM ValueState: 2,785,568,604,401,0,MIDM ReformDef: [Years,Car_type] ReformVal: [Years,Car_type] NumberFormat: 2,F,4,2,1,1,4,0,$,0,"ABBREV",0,,,0 Variable Cost_in_time Title: Cost_in_time Units: $ Description: Costs for three different cars, with three different fuel efficiencies, at five different times.~ ~ These numbers were pulled out of the air. Please, no litigation! Definition: Table(Car_type,Mpg,Time)(~ 2185,2294,2409,2529,2656,~ 2810,2951,3098,3253,3416,~ 3435,3607,3787,3976,4175,~ 2385,2314,2529,2649,2856,~ 2910,3041,3238,3343,3526,~ 3535,3847,3897,4166,4365,~ 3185,3294,3409,3529,3656,~ 3810,3951,4098,4253,4416,~ 4435,4607,4787,4976,5175~ ) NodeLocation: 360,208,1 NodeSize: 56,24 WindState: 1,64,56 ValueState: 2,353,501,435,192,0,MIDM ReformDef: [Time,Mpg] ReformVal: [Time,Mpg] {!40000|Att_ResultSliceState: [Car_type,1,Mpg,1,Time,1]} Alias Time1 Title: Time Definition: 1 NodeLocation: 80,152,1 NodeSize: 48,24 NodeInfo: 1,1,0,1,1,1,0,,0, Original: Time Variable Cost_of_ownership Title: Cost of ownership Definition: Table(Time,Car_type)(~ 2810,3535,3185,~ 2951,3847,3294,~ 3098,3897,3409,~ 3253,4166,3529,~ 3416,4365,3656~ ) NodeLocation: 216,264,1 NodeSize: 56,24 WindState: 2,161,157,486,313 DefnState: 2,504,75,406,537,0,MIDM ValueState: 2,357,371,416,303,0,MIDM ReformDef: [Time,Car_type] ReformVal: [Time,Car_type] Variable Rate_of_inflation Title: Rate of inflation Definition: Table(Years)(~ 1,1.01,1.02,1.03,1.04) NodeLocation: 216,208,1 NodeSize: 56,24 WindState: 2,484,70,476,224 DefnState: 2,0,256,416,303,0,MIDM ValueState: 2,352,363,416,303,0,MIDM ReformDef: [Years,Undefined] Variable Miles Title: Miles Definition: Table(Car_type,Years)(~ 8000,7000,10K,6000,9000,~ 10K,12K,11K,14K,13K,~ 5000,8000,8000,7000,10K~ ) NodeLocation: 216,96,1 NodeSize: 56,24 ValueState: 2,23,35,416,303,0,MIDM ReformDef: [Years,Car_type] ReformVal: [Years,Car_type] Variable Miles_per_gallon Title: Miles per gallon Definition: Table(Car_type)(~ 32,34,18) NodeLocation: 216,152,1 NodeSize: 56,24 ValueState: 2,32,43,416,303,0,MIDM ReformDef: [Car_type,Undefined] ReformVal: [Car_type,Undefined] Variable NumMaintEvents Title: Num Maint Events Definition: Table(MaintType,CarNum)(~ 10,4,9,4,4,1,4,~ 0,2,0,1,2,0,5,~ 0,2,0,0,1,0,0~ ) NodeLocation: 216,320,1 NodeSize: 56,24 DefnState: 2,132,139,648,259,0,MIDM ValueState: 2,96,107,619,303,0,MIDM ReformDef: [CarNum,MaintType] ReformVal: [CarNum,MaintType] Index MaintType {!40000|Att_PrevIndexValue: ['Repair','Scheduled','Tires']} Title: MaintType Definition: ['Repair','Scheduled','Tires'] NodeLocation: 80,264,1 NodeSize: 48,24 Index CarNum {!40000|Att_PrevIndexValue: [1,2,3,4,5,6,7]} Title: CarNum Definition: 1..7 NodeLocation: 80,208,1 NodeSize: 48,24 Variable Tires Title: Tires Definition: Table(CarNum)(~ 0,2,0,0,1,0,0) NodeLocation: 360,96,1 NodeSize: 56,24 DefnState: 2,148,155,584,207,0,MIDM ReformDef: [CarNum,Undefined] Variable NumRepairs Title: NumRepairs Definition: Table(CarNum)(~ 10,4,9,4,4,1,4) NodeLocation: 360,40,1 NodeSize: 56,24 DefnState: 2,23,251,633,303,0,MIDM ValueState: 2,128,139,657,303,0,MIDM ReformDef: [CarNum,Undefined] ReformVal: [CarNum,Undefined] Close Input_variables Module Relating_indexes_to_ Title: Relating indexes to values Author: lynda Date: Thu, Mar 28, 1996 11:30 AM DefaultSize: 48,24 NodeLocation: 128,32,1 NodeSize: 96,23 DiagState: 2,-3,150,884,427,17 Index Index_1 {!40000|Att_PrevIndexValue: ['a','b']} Title: Index_1 Description: An index with two arbitrary elements for this example. Definition: ['a','b'] NodeLocation: 64,48,1 NodeSize: 48,24 WindState: 1,82,72 ValueState: 1,83,71,244,190,0,MIDM Index Index_2 {!40000|Att_PrevIndexValue: ['c','d']} Title: Index_2 Description: An index with two arbitrary elements for this example. Definition: ['c','d'] NodeLocation: 64,118,1 NodeSize: 48,24 WindState: 1,80,72 ValueState: 1,82,72,240,177,0,MIDM Index Index_3 {!40000|Att_PrevIndexValue: ['e','f']} Title: Index_3 Description: An index with two arbitrary elements for this example. Definition: ['e','f'] NodeLocation: 64,192,1 NodeSize: 48,24 WindState: 1,82,72 ValueState: 1,80,71,222,169,0,MIDM Variable Index_order_example Title: Index order~ Example Description: This example demonstrates how the values of a table, which are given in an ordered list, are "fitted" with the dimensions of the table. The order of the dimensions is critical. The first dimension is the outermost, meaning it changes most slowly as you go up and down the value list. The last dimension is the innermost, meaning it changes most quickly as you go up and down the value list.~ ~ Switch the definition view of this example to "expression" view.~ ¥ The outermost index is Index_1. For example, the value of Index_1 stays "a" for the first half of the value list while the values of all other indexes change. It changes to "b" for the second half of the value list.~ ¥ The innermost index is Index_3. The value of this index changes with every next value in the value list, from "e" to "f" to "e" to "f", and so on. Definition: Table(Index_1,Index_2,Index_3)(~ 'value_ace', 'value_acf' ,~ 'value_ade', 'value_adf' ,~ 'value_bce', 'value_bcf' ,~ 'value_bde', 'value_bdf' ~ ) NodeLocation: 248,80,1 NodeSize: 48,32 WindState: 1,83,72 DefnState: 2,56,66,617,345,0,MIDM ValueState: 2,109,623,298,183,0,MIDM ReformDef: [Index_2,Index_1] ReformVal: [Index_2,Index_1] {!40000|Att_ResultSliceState: [Index_3,1,Index_1,1,Index_2,1]} Close Relating_indexes_to_ Module Sequence_ex Title: Sequence examples Description: The examples in this module demonstrate the Sequence function, which is a very useful function for defining lists. Author: Mike Steele Date: Tue, Jan 9, 1996 11:47 PM DefaultSize: 48,24 NodeLocation: 128,88,1 NodeSize: 96,23 DiagState: 2,91,407,548,152,17 WindState: 1,78,83 Variable Sequence_example_1 Title: Sequence function~ Example 1 Description: "Sequence(start, end, stepsize)" creates a list of successive numbers from Start to End, each differing from the next by Stepsize.~ ~ When End is greater than Start, the sequence is increasing. When Stepsize is not specified, a step size of 1 is assumed.~ ~ This example evaluates to the list: "1, 2, 3, 4, 5". Definition: Sequence(1, 5) NodeLocation: 72,73,1 NodeSize: 56,31 WindState: 2,80,81,644,386 ValueState: 1,78,82,307,221,0,MIDM Variable Sequence_example_2 Title: Sequence function~ Example 2 Description: "Sequence(start, end, stepsize)" creates a list of successive numbers from Start to End, each differing from the next by Stepsize.~ ~ When Start is greater than End, the sequence is decreasing. When Stepsize is not specified, a step size of 1 is assumed.~ ~ This example evaluates to the list: "5, 4, 3, 2, 1". Definition: Sequence(5,1) NodeLocation: 192,73,1 NodeSize: 56,31 WindState: 1,60,66 ValueState: 1,79,83,310,209,0,MIDM Variable Sequence_example_3 Title: Sequence function~ Example 3 Description: "Sequence(start, end, stepsize)" creates a list of successive numbers from Start to End, each differing from the next by Stepsize.~ ~ If Start and End are not integers, and if Stepsize is not specified, Analytica rounds Start and End to the nearest integer and assumes a step size of 1.~ ~ This example evaluates to the list: "1, 2, 3, 4, 5". Definition: Sequence(1.2, 4.8) NodeLocation: 312,73,1 NodeSize: 56,31 WindState: 1,78,83 ValueState: 1,80,82,303,209,0,MIDM Variable Sequence_example_4 Title: Sequence function~ Example 4 Description: "Sequence(start, end, stepsize)" creates a list of successive numbers from Start to End, each differing from the next by Stepsize.~ ~ If Stepsize is specified, Analytica can create non-integer values from Start to End. Definition: Sequence( 0.5, 2.5, 0.5 ) NodeLocation: 432,73,1 NodeSize: 56,31 WindState: 1,77,81 ValueState: 1,79,82,300,210,0,MIDM NumberFormat: 1,F,2,1,0,0 Close Sequence_ex Module Functions_that_selec Title: Functions that select part of an array Description: The examples in this module demonstrate Analytica's functions for selecting an element or slice of an array. The result of each of these functions has one dimension less than the number of dimensions of its input. Author: lynda Date: Thu, Mar 28, 1996 11:30 AM DefaultSize: 48,24 NodeLocation: 336,33,1 NodeSize: 96,23 DiagState: 2,205,98,620,350,17 Variable Ident_example_1 Title: Ident[] function~ Example 1 Description: "Ident[I = U]" returns the element or cross-section of array Ident for which index I has value U. If U is a list, this function will return several elements or cross-sections of array A along index I.~ ~ In this example, the price for a VW in each year is returned. Definition: Car_prices[Car_type = 'VW'] NodeLocation: 80,104,1 NodeSize: 56,24 WindState: 1,82,72 ValueState: 1,81,72,270,204,0,MIDM Variable Ident_example_3 Title: Ident[] function~ Example 3 Description: "Ident[I = U]" returns the element or cross-section of array Ident for which index I has value U. If U is a list, this function will return several elements or cross-sections of array A along index I.~ ~ This example demonstrates that you can specify more than one index at once. The price for a Honda in 2007 is returned. Definition: Car_prices[Car_type = 'Honda', Years = 2007] NodeLocation: 384,104,1 NodeSize: 56,24 WindState: 1,84,72 ValueState: 1,82,72,268,167,0,MIDM Variable Slice_example_1 Title: Slice function~ Example 1 Description: "Slice(U, I, N)" returns the element or cross-section of array U for which index I has position N. If N is a list, this function will return several elements or cross-sections of array U along index I.~ ~ Compare this with the Subscript function, which matches a value within the index I rather than a position in index I.~ ~ This example returns the values in Cost corresponding to the first element in Car_type, that is, the values for 'VW'. Definition: Slice(Cost, Car_type, 1) NodeLocation: 80,176,1 NodeSize: 56,24 WindState: 1,81,72 ValueState: 1,82,71,267,196,0,MIDM Variable Slice_example_2 Title: Slice function~ Example 2 Description: "Slice(U, I, N)" returns the element or cross-section of array U for which index I has position N. If N is a list, this function will return several elements or cross-sections of array U along index I.~ ~ Compare this with the Subscript function, which matches a value within the index I rather than a position in index I.~ ~ This example returns the values in Cost corresponding to the first and second elements in Car_type, that is, the values for 'VW' and 'Honda'. Definition: Slice(Cost, Car_type, [1,2]) NodeLocation: 232,176,1 NodeSize: 56,24 WindState: 1,80,71 ValueState: 2,105,169,306,210,0,MIDM ReformVal: [Self,Mpg] Variable Subscript_example_1 Title: Subscript function~ Example 1 Description: "Subscript(U1, I, U2)" returns the element or cross-section of array U1 for which index I has value U2. If U2 is a list, this function will return several elements or cross-sections of array U1 along index I.~ ~ Compare this with the Slice function, which matches a position in index I rather than a value within index I.~ ~ This example returns the costs, for each car type, corresponding to a mpg of 26. Definition: Subscript(Cost, Mpg, 26) NodeLocation: 80,249,1 NodeSize: 64,31 WindState: 1,80,72 ValueState: 1,83,73,295,190,0,MIDM Variable Subscript_example_2 Title: Subscript function~ Example 2 Description: "Subscript(U1, I, U2)" returns the element or cross-section of array U1 for which index I has value U2. If U2 is a list, this function will return several elements or cross-sections of array U1 along index I.~ ~ Compare this with the Slice function, which matches a position in index I rather than a value within index I.~ ~ This example returns the costs, corresponding to all three mpg's, for a VW and a Honda. Definition: Subscript(Cost, Car_type, ['VW','Honda']) NodeLocation: 232,249,1 NodeSize: 64,31 WindState: 1,80,72 ValueState: 1,113,146,350,138,0,MIDM ReformVal: [Mpg,Self] Variable Subscript_example_3 Title: Subscript function~ Example 3 Description: "Subscript(U1, I, U2)" returns the element or cross-section of array U1 for which index I has value U2. If U2 is a list, this function will return several elements or cross-sections of array U1 along index I.~ ~ Compare this with the Slice function, which matches a position in index I rather than a value within index I.~ ~ This example demonstrates that the first parameter can be an arbitrary expression. This example returns the costs divided by 12, for each car type, corresponding to a mpg of 26. Definition: Subscript(Cost/12, Mpg, 26) NodeLocation: 400,249,1 NodeSize: 64,31 WindState: 1,83,73 ValueState: 1,80,73,316,144,0,MIDM Variable Ident_example_2 Title: Ident[] function~ Example 2 Description: "Ident[I = U]" returns the element or cross-section of array Ident for which index I has value U. If U is a list, this function will return several elements or cross-sections of array A along index I.~ ~ This example demonstrates that you can specify more than one value for the index at once. Definition: Car_prices[Car_type= ['VW','Honda']] NodeLocation: 232,104,1 NodeSize: 56,24 ValueState: 2,82,72,522,203,0,MIDM ReformVal: [Years,Self] Variable Choice_example_1 Title: Choice function~ Example 1 Description: "Choice(I, n)" returns the nth item of index I. A popup menu will appear in the definition field to make it easy for users to choose the item returned from index I.~ ~ In this example, the choices in the popup menu are given by the index "Years". Switch the definition view back and forth between "expression" view and "choice" view as you select different choices in the popup menu. When you make a new selection in the popup menu, the second parameter of the expression, n, changes automatically to the new selection.~ ~ When "2006" is selected in the popup menu, this variable returns "2006". Definition: Choice(Years,2) NodeLocation: 80,33,1 NodeSize: 56,31 WindState: 2,58,27,569,522 ValueState: 1,80,72,261,157,0,MIDM {!40200|Att_ChoiceIndexes: Index Years} Variable Choice_example_2 Title: Choice function~ Example 2 Description: "Choice(I, n)" returns the nth item of index I. A popup menu will appear in the definition field to make it easy for users to choose the item returned from index I.~ ~ In this example, the "all" choice in the popup menu is selected. "All" is always an option in the choices popup menu. If you switch the definition view to "expression" view, you will notice that the "all" selection corresponds to an "n" of zero.~ ~ When "all" is selected, this variable results in an array filled with all the options of the popup menu. In this example "2005, 2006, 2007, 2008, 2009" is returned. Definition: Choice(Years,0) NodeLocation: 232,33,1 NodeSize: 56,31 WindState: 1,81,71 ValueState: 1,80,72,266,190,0,MIDM {!40200|Att_ChoiceIndexes: Index Years} Variable Choice_example_3 Title: Choice function~ Example 3 Description: "Choice(I, n)" returns the nth item of index I. A popup menu will appear in the definition field to make it easy for users to choose the item returned from index I.~ ~ Switch the definition view to "expression" view. This example demonstrates that "Self" can be the first parameter to the Choice function. In this case, the options in the choice popup menu come from the domain of the variable. Definition: Choice(Self,3) NodeLocation: 384,32,1 NodeSize: 56,31 WindState: 2,81,72,611,709 ValueState: 1,78,72,263,158,0,MIDM Domain: [2005,2006,2007,2008,2009] {!40300|DomainExpr: Discrete(2005,2006,2007,2008,2009)} {!40200|Att_ChoiceIndexes: Keyword Self} Close Functions_that_selec Module Controlfunctions Title: Control Functions Description: Examples of the control functions, For..Do and Using..Do Author: lynda Date: Fri, Jun 14, 1996 1:08 PM SaveAuthor: lynda SaveDate: Wed, Jun 19, 1996 4:41 PM DefaultSize: 48,24 NodeLocation: 336,312,1 NodeSize: 96,23 DiagState: 2,249,-7,479,283,17 Module For___do_example_1 Title: For...Do Example 1 Description: This uses For...Do to perform linear interpolation with a 2-dimensional array. The Linearinterp() function requires a 1-dimensional array. Author: rich Date: Fri, Mar 07, 1997 4:15 AM DefaultSize: 48,24 NodeLocation: 176,32 NodeSize: 88,16 DiagState: 2,129,59,449,243,17 Index J {!40000|Att_PrevIndexValue: [1,2,3,4,5]} Title: J Description: an index of X and Y Definition: [1,2,3,4,5] NodeLocation: 48,56,1 NodeSize: 20,12 Variable Y_out Title: Y_out Description: Linear interpolation with For...Do. Definition: For L:=K Do Linearinterp(X[K=L],Y[K=L],X_in) NodeLocation: 312,104 NodeSize: 44,20 ValueState: 2,128,396,358,152,0,MIDM ReformVal: [X_in,K] Variable X_in Title: X_in Description: The values to be interpolated. Definition: [10.5,12.3,14.1,14.6] NodeLocation: 168,160 NodeSize: 44,20 ValueState: 2,220,151,196,190,0,MIDM Variable X Title: X Description: The increasing values over which Y is a function. Since this is a 2-dimensional array, the Linearinterp() function cannot be used in the normal way. Definition: Table(J,K)(~ 10,9,5,~ 12,11.2,7,~ 13,12.1,9,~ 14,13.5,13,~ 15,16,15~ ) NodeLocation: 168,48 NodeSize: 44,20 DefnState: 2,46,341,408,147,0,MIDM ValueState: 2,168,218,416,303,0,MIDM ReformDef: [J,K] ReformVal: [J,K] Variable Y Title: Y Description: The function of X from which the interpolation values are sought. Definition: Table(J,K)(~ 5,21,16,~ 6,23,18,~ 7,21,17,~ 8,23,16,~ 9,21,13~ ) NodeLocation: 168,104 NodeSize: 44,20 DefnState: 1,258,262,402,143,0,MIDM ValueState: 1,56,66,416,303,0,MIDM ReformDef: [J,K] ReformVal: [J,K] Index K {!40000|Att_PrevIndexValue: [10,11,12]} Title: K Description: an index of X and Y Definition: [10,11,12] NodeLocation: 48,88 NodeSize: 20,12 Text Te1 Description: For..Do NodeLocation: 330,72,-1 NodeSize: 46,8 Close For___do_example_1 Module For___do_example_2 Title: For...Do Example 2 Description: This example calculates an inner product in two ways; the second uses For...Do. To see the differences in memory usages, select "Show Memory Usage" from the Window menu. Author: rich Date: Fri, Mar 07, 1997 4:15 AM DefaultSize: 48,24 NodeLocation: 176,88 NodeSize: 88,16 DiagState: 2,184,261,426,206,17 Index M Title: M Description: An index of Array A Definition: Sequence( 1, 100, 1 ) NodeLocation: 64,40 NodeSize: 16,12 {!40000|Att_PrevIndexValue: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100]} Index N Title: N Description: An index of Array A and Array B Definition: Sequence( 1, 100, 1 ) NodeLocation: 64,88 NodeSize: 16,12 {!40000|Att_PrevIndexValue: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100]} Index P {!40000|Att_PrevIndexValue: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]} Title: P Description: An index of Array B Definition: Sequence( 1, 30, 1 ) NodeLocation: 64,128 NodeSize: 16,12 Variable Array_a Title: Array A Description: A large array Definition: Table(M,N)(~ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 1.01,2.1,3.3,4.4,5.5,6.6,7.7,8.800000000000001,9.9,10.1,11.11,12.2,13.3,14.4,15.5,16.6,17.7,18.8,19.9,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 1.0201,2.2,3.6,4.8,6,7.2,8.4,9.6,10.8,10.2,11.22,12.4,13.6,14.8,16,17.2,18.4,19.6,20.8,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0~ ) NodeLocation: 176,48 NodeSize: 44,20 WindState: 2,219,217,476,224 DefnState: 2,35,185,716,538,0,MIDM ValueState: 2,64,75,416,303,0,MIDM Aliases: Alias Array_a2 ReformDef: [N,M] ReformVal: [N,M] Variable Array_b Title: Array B Description: A large array Definition: Table(N,P)(~ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,~ 1.01,2.1,3.3,4.4,5.5,6.6,7.7,8.8,9.9,10.1,11.11,12.2,13.3,14.4,15.5,16.6,17.7,18.8,19.9,22,1.01,2.1,3.3,4.4,5.5,6.6,7.7,8.8,9.9,10.1,~ 1.0201,2.2,3.6,4.8,6,7.2,8.4,9.6,10.8,10.2,11.22,12.4,13.6,14.8,16,17.2,18.4,19.6,20.8,24,1.0201,2.2,3.6,4.8,6,7.2,8.4,9.6,10.8,10.2,~ 1.0303,2.3,3.9,5.2,6.5,7.8,9.1,10.4,11.7,10.3,11.33,12.6,13.9,15.2,16.5,17.8,19.1,20.4,21.7,26,1.0303,2.3,3.9,5.2,6.5,7.8,9.1,10.4,11.7,10.3,~ 1.0406,2.4,4.2,5.6,7,8.4,9.8,11.2,12.6,10.4,11.44,12.8,14.2,15.6,17,18.4,19.8,21.2,22.6,28,1.0406,2.4,4.2,5.6,7,8.4,9.8,11.2,12.6,10.4,~ 1.05101,2.5,4.5,6,7.5,9,10.5,12,13.5,10.5,11.55,13,14.5,16,17.5,19,20.5,22,23.5,30,1.05101,2.5,4.5,6,7.5,9,10.5,12,13.5,10.5,~ 1.06152,2.6,4.8,6.4,8,9.6,11.2,12.8,14.4,10.6,11.66,13.2,14.8,16.4,18,19.6,21.2,22.8,24.4,32,1.06152,2.6,4.8,6.4,8,9.6,11.2,12.8,14.4,10.6,~ 1.07214,2.7,5.1,6.8,8.5,10.2,11.9,13.6,15.3,10.7,11.77,13.4,15.1,16.8,18.5,20.2,21.9,23.6,25.3,34,1.07214,2.7,5.1,6.8,8.5,10.2,11.9,13.6,15.3,10.7,~ 1.08286,2.8,5.4,7.2,9,10.8,12.6,14.4,16.2,10.8,11.88,13.6,15.4,17.2,19,20.8,22.6,24.4,26.2,36,1.08286,2.8,5.4,7.2,9,10.8,12.6,14.4,16.2,10.8,~ 1.09369,2.9,5.7,7.6,9.5,11.4,13.3,15.2,17.1,10.9,11.99,13.8,15.7,17.6,19.5,21.4,23.3,25.2,27.1,38,1.09369,2.9,5.7,7.6,9.5,11.4,13.3,15.2,17.1,10.9,~ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,1,2,3,4,5,6,7,8,9,10,~ 1.01,2.1,3.3,4.4,5.5,6.6,7.7,8.8,9.9,10.1,11.11,12.2,13.3,14.4,15.5,16.6,17.7,18.8,19.9,22,1.01,2.1,3.3,4.4,5.5,6.6,7.7,8.8,9.9,10.1,~ 1.0201,2.2,3.6,4.8,6,7.2,8.4,9.6,10.8,10.2,11.22,12.4,13.6,14.8,16,17.2,18.4,19.6,20.8,24,1.0201,2.2,3.6,4.8,6,7.2,8.4,9.6,10.8,10.2,~ 1.0303,2.3,3.9,5.2,6.5,7.8,9.1,10.4,11.7,10.3,11.33,12.6,13.9,15.2,16.5,17.8,19.1,20.4,21.7,26,1.0303,2.3,3.9,5.2,6.5,7.8,9.1,10.4,11.7,10.3,~ 1.0406,2.4,4.2,5.6,7,8.4,9.8,11.2,12.6,10.4,11.44,12.8,14.2,15.6,17,18.4,19.8,21.2,22.6,28,1.0406,2.4,4.2,5.6,7,8.4,9.8,11.2,12.6,10.4,~ 1.05101,2.5,4.5,6,7.5,9,10.5,12,13.5,10.5,11.55,13,14.5,16,17.5,19,20.5,22,23.5,30,1.05101,2.5,4.5,6,7.5,9,10.5,12,13.5,10.5,~ 1.06152,2.6,4.8,6.4,8,9.6,11.2,12.8,14.4,10.6,11.66,13.2,14.8,16.4,18,19.6,21.2,22.8,24.4,32,1.06152,2.6,4.8,6.4,8,9.6,11.2,12.8,14.4,10.6,~ 1.07214,2.7,5.1,6.8,8.5,10.2,11.9,13.6,15.3,10.7,11.77,13.4,15.1,16.8,18.5,20.2,21.9,23.6,25.3,34,1.07214,2.7,5.1,6.8,8.5,10.2,11.9,13.6,15.3,10.7,~ 1.08286,2.8,5.4,7.2,9,10.8,12.6,14.4,16.2,10.8,11.88,13.6,15.4,17.2,19,20.8,22.6,24.4,26.2,36,1.08286,2.8,5.4,7.2,9,10.8,12.6,14.4,16.2,10.8,~ 1.09369,2.9,5.7,7.6,9.5,11.4,13.3,15.2,17.1,10.9,11.99,13.8,15.7,17.6,19.5,21.4,23.3,25.2,27.1,38,1.09369,2.9,5.7,7.6,9.5,11.4,13.3,15.2,17.1,10.9,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,~ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0~ ) NodeLocation: 176,112 NodeSize: 44,20 ValueState: 2,146,60,686,509,0,MIDM Aliases: Alias Array_b1 ReformDef: [P,N] ReformVal: [P,N] Variable Inner_product__slow_ Title: Inner Product (more memory) Description: This is the normal way to compute the inner product of an array. During calculation, Analytica requires memory for the M x N x P array. Definition: Sum(Array_a*Array_b, N) NodeLocation: 320,48,1 NodeSize: 64,24 WindState: 1,86,220 ValueState: 2,120,130,725,469,0,MIDM ReformVal: [P,M] Variable Inner_product__with_ Title: Inner Product (with For...Do) Description: Computing the inner product with For...Do.~ ~ During calculation, Analytica only requires memory for the N x P array at a time. Definition: For L:=M Do Sum(Array_a[M=L]*Array_b,N) NodeLocation: 320,112,1 NodeSize: 64,24 ValueState: 2,136,146,660,518,0,MIDM ReformVal: [P,M] Close For___do_example_2 Module Using___do_example_1 Title: Using...Do Example 1 Description: Example of Using...Do with a repeated expression.~ ~ Note: Using..Do is synomymous with Var..Do. Author: rich Date: Fri, Mar 07, 1997 4:15 AM DefaultSize: 48,24 NodeLocation: 176,144,1 NodeSize: 96,16 DiagState: 2,125,369,449,170,17 Variable Using__do Title: Using..Do Description: With this definition, Sum(Array_a*Array_b,N) only has to be evaluated once. This is more compact, clearer to read, and more efficient to evaluate than the usual definition of~ Sum(Array_a*Array_b,N)/(1 + Sum(Array_a*Array_b,N)) Definition: Using t:=Sum(Array_a*Array_b,N) do t/(1+t) NodeLocation: 272,72 NodeSize: 44,20 ValueState: 2,136,146,685,433,0,MIDM ReformVal: [M,P] Alias Array_a2 Title: Array A Definition: 1 NodeLocation: 120,32 NodeSize: 44,20 Original: Array_a Alias Array_b1 Title: Array B Definition: 1 NodeLocation: 120,104 NodeSize: 44,20 Original: Array_b Close Using___do_example_1 Module Using___do_example_2 Title: Using...Do Example 2 Description: Example of nested Using...Do's Author: rich Date: Fri, Mar 07, 1997 4:15 AM DefaultSize: 48,24 NodeLocation: 176,200,1 NodeSize: 96,16 DiagState: 2,31,29,772,300,17 Index Data_index {!40000|Att_PrevIndexValue: [1,2,3,4,5,6,7,8,9,10]} Title: Data index Description: Index for Xdata and Ydata Definition: Sequence( 1, 10, 1 ) NodeLocation: 48,104,1 NodeSize: 32,20 ValueState: 2,282,524,416,303,0,MIDM Variable Xdata Title: Xdata Description: A set of data points, for which we want to compute the correlation with Ydata. Definition: Table(Data_index)(~ 2,5,3,4,6,9,5,3,4,6) NodeLocation: 144,40,0 NodeSize: 44,20 ValueState: 2,442,27,163,303,0,MIDM Variable Ydata Title: Ydata Description: A set of data points, for which we want to compute the correlation with Xdata. Definition: Table(Data_index)(~ 5,8,4,3,0,7,4,2,9,2) NodeLocation: 144,168,0 NodeSize: 44,20 ValueState: 2,385,285,416,303,0,MIDM Variable Brute_force_correlat Title: Brute Force Correlation Description: This is the usual way of definition the correlation between Xdata and Ydata. Definition: Sum((Xdata-Sum(Xdata,Data_index)/Nopts)*(Ydata-Sum(Ydata,Data_index)/Nopts),Data_index)/Sqrt(Sum((Xdata-Sum(Xdata,Data_index)/Nopts)^2,Data_index)*Sum((Ydata-Sum(Ydata,Data_index)/Nopts)^2,Data_index)) NodeLocation: 336,40,1 NodeSize: 91,20 ValueState: 1,55,366,312,111,0,MIDM Variable Nested_using_correla Title: Nested Using Correlation Description: This definition of the correlation between Xdata and Ydata has a nested "Using...Do" structure. Definition: Using Mx := (Sum(Xdata,Data_index)/Nopts) Do Using My := (Sum(Ydata,Data_index)/Nopts) ~ Do Using dX := (Xdata-Mx) Do Using dY := (Ydata-My) ~ Do Sum(Dx*Dy,Data_index)/Sqrt(Sum(dX^2,Data_index)*Sum(dY^2,Data_index)) NodeLocation: 336,168,1 NodeSize: 97,20 ValueState: 1,334,366,320,115,0,MIDM Variable Nopts Title: Nopts Description: The number of data points in Xdata (or Ydata). Definition: Size(Data_index) NodeLocation: 144,104,1 NodeSize: 48,16 ValueState: 2,208,219,191,142,0,MIDM Close Using___do_example_2 Text Te2 Description: Note: Using..Do is synonymous with Var..Do. NodeLocation: 360,101,-1 NodeSize: 84,29 Close Controlfunctions Module Converting_between_r Title: Converting between relational tables Description: Demonstration of MdTable and MdArrayToTable from Chapter 12: More Array Functions -- Converting between arrays and relational tables. Author: Lonnie Date: Fri, Aug 21, 2009 8:22 AM SaveAuthor: Lonnie SaveDate: Fri, Aug 21, 2009 8:21 AM DefaultSize: 48,24 NodeLocation: 128,312,0 NodeSize: 96,23 DiagState: 2,70,22,846,667,17 WindState: 2,583,432,476,224 Index Number Title: Number Definition: 1..3 NodeLocation: 88,80,1 NodeSize: 48,24 ValueState: 2,464,475,176,168,0,MIDM {!40000|Att_PrevIndexValue: [1,2,3]} Index Letter Title: Letter Definition: ['A','B','C'] NodeLocation: 88,144,1 NodeSize: 48,24 ValueState: 2,480,491,172,173,0,MIDM {!40000|Att_PrevIndexValue: ['A','B','C']} Index Hue Title: Hue Definition: ['Red','Green','Blue'] NodeLocation: 88,208,1 NodeSize: 48,24 ValueState: 2,496,507,161,162,0,MIDM {!40000|Att_PrevIndexValue: ['Red','Green','Blue']} Variable Array_3x3x3 Title: Array_3x3x3 Definition: Table(Number,Letter,Hue)(~ 45,34,21,~ 13,11,48,~ 12,84,57,~ 19,25,65,~ 21,62,33,~ 43,45,56,~ 92,45,95,~ 81,19,12,~ 47,53,23~ ) NodeLocation: 88,280,1 NodeSize: 56,24 DefnState: 2,180,234,416,303,0,MIDM ValueState: 2,80,503,289,180,0,MIDM ReformDef: [Number,Letter] ReformVal: [Number,Hue] {!40000|Att_EditSliceState: [Hue,3,Letter,1,Number,1]} Variable MDArrayToTable_Exam1 Title: MDArrayToTable Example 1 Description: MDArrayToTable(A, I, L) transforms a multi-dimensional array, A, into a two-dimensional array (i.e., a table) indexed by I and L.~ ~ In this example, three dimensional array "Array_3x3x3x" is converted to a table indexed by Row and Column where~ Row := 1..size(Array_3x3x3x) and Col := ['Number','Letter','Hue','Values'] Definition: MdArrayToTable(Array_3x3x3, Row, Col) NodeLocation: 416,152,1 NodeSize: 72,24 ValueState: 2,738,32,349,556,0,MIDM ReformVal: [Col,Row] Index Row Title: Row Definition: 1.. size(Array_3x3x3) NodeLocation: 240,88,1 NodeSize: 48,24 Index Col Title: Col Definition: ['Number','Letter','Hue','Values'] NodeLocation: 336,88,1 NodeSize: 48,24 Variable MDArrayToTable_Examp Title: MDArrayToTable Example 2 Description: MDArrayToTable(A, I, L) transforms a multi-dimensional array, A, into a two-dimensional array (i.e., a table) indexed by I and L.~ ~ In this example, three dimensional array "Array_3x3x3x" is converted to a table indexed by Row and Column where~ Row := 1..size(Array_3x3x3x) and Col := ['Number','Letter','Hue','Values'].~ The optional "positional" parameter to the MdArrayToTable parameter is set to true, so the resulting table has the index positions for "Number", "Letter" and "Hue" instead of their index values. Definition: MDArrayToTable(Array_3x3x3,Row,Col, positional:true) NodeLocation: 416,208,1 NodeSize: 72,24 ValueState: 2,272,283,369,536,0,MIDM ReformVal: [Col,Row] Index Headings {!40000|Att_PrevIndexValue: ['X','Y','Z','Values']} Title: Headings Definition: ['X','Y','Z','Values'] NodeLocation: 432,88,1 NodeSize: 48,24 ValueState: 2,323,444,168,195,0,MIDM Variable Index2Heading Title: Index2Heading Definition: Table(Headings)(~ 'Number','Letter','Hue','Anything') NodeLocation: 248,152,1 NodeSize: 64,24 ValueState: 2,384,395,172,191,0,MIDM Variable MDArrayToTable_Exam2 Title: MDArrayToTable Example 3 Description: MDArrayToTable(A, I, L) transforms a multi-dimensional array, A, into a two-dimensional array (i.e., a table) indexed by I and L.~ ~ In this example, three dimensional array "Array_3x3x3x" is converted to a table indexed by "Row" and "Index2Heading" where~ Row := 1..size(Array_3x3x3x) and Index2Heading := Table(Headings) ('Number','Letter','Hue','Anything'). The resulting table gets the column headings from the "Headings" index which indexes "Index2Heading". ~ The optional "positional" parameter to the MdArrayToTable parameter is set to true, so the resulting table has the index positions for "Number", "Letter" and "Hue" instead of their index values.~ Definition: MDArrayToTable(Array_3x3x3,Row,Index2Heading,positional:true) NodeLocation: 416,264,1 NodeSize: 72,24 ValueState: 2,352,363,348,552,0,MIDM ReformVal: [Headings,Row] Index Rows {!40000|Att_PrevIndexValue: [1,2,3,4,5,6,7,8,9]} Title: Rows Definition: 1..sum(1, Number, Letter) NodeLocation: 384,392,1 NodeSize: 48,24 ValueState: 2,512,523,169,278,0,MIDM Index Cols {!40000|Att_PrevIndexValue: ['Number','Letter','Red','Green','Blue']} Title: Cols Definition: ['Number','Letter','Red','Green','Blue'] NodeLocation: 384,448,1 NodeSize: 48,24 ValueState: 2,288,299,166,195,0,MIDM Variable MDArrayToTable_Exam3 Title: MDArrayToTable Example 4 Description: MDArrayToTable(A, I, L) transforms a multi-dimensional array, A, into a two-dimensional array (i.e., a table) indexed by I and L.~ ~ This MdArrayToTable example transforms a 3 dimensional array to a table in fact table form indexed by "Rows" and "Cols" where~ Rows :=1..sum(1, Number, Letter) and Cols:= ['Number','Letter','Red','Green','Blue']. Definition: MDArrayToTable(Array_3x3x3,Rows,Cols,Hue) NodeLocation: 248,392,1 NodeSize: 72,24 ValueState: 2,764,36,435,267,0,MIDM ReformVal: [Cols,Rows] Variable MDTable_Example_1 Title: MDTable Example 1 Description: MDTable(T, rows, cols, vars, conglomerationFn, defaultValue, ValueColumn) Returns a multi-dimensional array from a two-dimensional table of values. If n is the total number of columns and m is the number of value columns in the table T, the following structure is assumed: The first n-m columns of T specify coordinates, and the right-most m columns contain data values.~ ~ This MdTable example transforms a table in fact table form to a 3 dimensional array. Definition: MDTable(MDArrayToTable_Exam3, rows, cols, ['Number','Letter'], ValueColumn:Hue) NodeLocation: 248,568,1 NodeSize: 48,24 ValueState: 2,32,43,300,203,0,MIDM ReformVal: [Number,Letter] {!40000|Att_ResultSliceState: [Hue,3,Letter,1,Number,1]} Variable Facttable_with_missi Title: Facttable with missing values Description: Fact table with missing data values to use with MdTable Example 2 Definition: Table(Rows,Cols)(~ 1,'A',45,34,21,~ 1,'B',13,11,48,~ 1,'B',12,84,57,~ 2,'A',19,25,65,~ 2,'B',21,62,33,~ 2,'C',43,45,56,~ 3,'A',92,45,95,~ 3,'B',81,19,12,~ 3,'C',47,53,23~ ) NodeLocation: 376,568,1 NodeSize: 60,28 ValueState: 2,400,411,430,257,0,MIDM ReformDef: [Cols,Rows] ReformVal: [Cols,Rows] Variable MDTable_Example_2 Title: MDTable Example 2 Description: MDTable(T, rows, cols, vars, conglomerationFn, defaultValue, ValueColumn) Returns a multi-dimensional array from a two-dimensional table of values. If n is the total number of columns and m is the number of value columns in the table T, the following structure is assumed: The first n-m columns of T specify coordinates, and the right-most m columns contain data values.~ ~ This MdTable example demonstrates how missing data and duplicate data can be handled. Missing values are replaced with the provided "N/A" value and duplicate values are conglomerated using the "average" function in this example. Definition: MdTable(Facttable_with_missi, Rows, Cols, ["Number", "Letter"], "average", "N/A", Hue) NodeLocation: 376,648,1 NodeSize: 48,24 ValueState: 2,448,459,286,188,0,MIDM ReformVal: [Number,Letter] {!40000|Att_ResultSliceState: [Hue,2,Letter,1,Number,1]} Text Te4 Description: Face table transformation NodeLocation: 304,336,-1 NodeSize: 104,16 NodeInfo: 1,0,0,1,0,0,0,,0, WindState: 2,94,83,476,224 Text Te3 Description: Relational table transformation NodeLocation: 324,40,-1 NodeSize: 116,16 NodeInfo: 1,0,0,1,0,0,0,,0, WindState: 2,94,83,476,224 Text Te5 Description: MdTable Examples NodeLocation: 304,528,-1 NodeSize: 112,16 NodeInfo: 1,0,0,1,0,0,0,,0, WindState: 2,94,83,476,224 Close Converting_between_r Module Set_Functions Title: Set Functions Description: SetDifference(originalSet, remove, remove, remove, ..., resultIndex,keepNulls) Returns the set of non-Null elements in originalSet that do not appear in any of the other remove sets. The result is a reference to a list (a set) unless the optional resultIndex is specified, in which case the result is indexed by resultIndex. Null value are always removed unless the optional keepNulls parameter is specified as true.~ ~ This example returns the numbers in the set \(1..10) that are not members of \Sequence(2, 10, 2) and \Sequence(3, 10, 3). Author: abhay Date: Wed, Oct 27, 2010 4:40 PM DefaultSize: 48,24 NodeLocation: 336,144,1 NodeSize: 96,23 DiagState: 2,89,246,606,451,17 Variable SetContains_Example Title: SetContains Example Description: SetContains(set, element) returns true if the element is a member of the set.~ ~ This example tests to see where the set \Sequence(7, 1000, 7) contains the elements 770, 775 and 777. Definition: SetContains(\Sequence(7,1000,7),[770,775,777]) NodeLocation: 112,56,1 NodeSize: 68,24 Module SetsAreEqual_Exampl1 Title: SetsAreEqual Examples Author: abhay Date: Wed, Oct 27, 2010 4:40 PM DefaultSize: 48,24 NodeLocation: 112,120,1 NodeSize: 68,24 DiagState: 2,35,128,571,339,17 Variable SetsAreEqual_Example Title: SetsAreEqual Example 3 Description: SetsAreEqual(sets,i,ignoreNull) returns true when all the sets along i have exactly the same elements, without regard to duplicates or ordering, and ignoring Null values (unless the optional ignoreNull parameter is~ false).~ ~ This example tests to see if the sets L1, L2 and L3 have the same elements. By default, Null values are ignored. Definition: SetsAreEqual( [\L1,\L2,\L3] ) NodeLocation: 112,200,1 NodeSize: 64,24 WindState: 2,96,494,668,363 Variable L1 Title: L1 Definition: [1,1,1,2,3] NodeLocation: 112,120,1 NodeSize: 56,24 Variable L2 Title: L2 Definition: [3,2,2,1] NodeLocation: 256,120,1 NodeSize: 56,24 Variable L3 Title: L3 Definition: [2,3,1,Null] NodeLocation: 392,120,1 NodeSize: 56,24 Variable SetsAreEqual_Exampl4 Title: SetsAreEqual Example 4 Description: SetsAreEqual(sets,i,ignoreNull) returns true when all the sets along i have exactly the same elements, without regard to duplicates or ordering, and ignoring Null values (unless the optional ignoreNull parameter is~ false).~ ~ This example tests to see if the sets L1, L2 and L3 have the same elements without ignoring Null values by passing false to the optional "ignoreNull" parameter. Definition: SetsAreEqual( [\L1,\L2,\L3], ignoreNull:false) NodeLocation: 256,200,1 NodeSize: 64,24 Variable SetsAreEqual_Exampl2 Title: SetsAreEqual Example 1 Description: SetsAreEqual(sets,i,ignoreNull) returns true when all the sets along i have exactly the same elements, without regard to duplicates or ordering, and ignoring Null values (unless the optional ignoreNull parameter is~ false).~ ~ This example tests to see if the sets L1, L2 and L3 have the same elements. By default, Null values are ignored. Definition: Var L1 := ['a','b','c',null];~ Var L2 := ['b','c','a'];~ Var L3 := ['c','b','a','b'];~ SetsAreEqual([\L1,\L2,\L3]) NodeLocation: 112,56,1 NodeSize: 64,24 WindState: 2,96,494,668,363 Variable SetsAreEqual_Exampl3 Title: SetsAreEqual Example 2 Description: SetsAreEqual(sets,i,ignoreNull) returns true when all the sets along i have exactly the same elements, without regard to duplicates or ordering, and ignoring Null values (unless the optional ignoreNull parameter is~ false).~ ~ This example tests to see if the sets L1, L2 and L3 have the same elements without ignoring Null values by passing false to the optional "ignoreNull" parameter. Definition: Var L1 := ['a','b','c',null];~ Var L2 := ['b','c','a'];~ Var L3 := ['c','b','a','b'];~ SetsAreEqual([\L1,\L2,\L3],ignoreNull:false) NodeLocation: 256,56,1 NodeSize: 64,24 Close SetsAreEqual_Exampl1 Module SetIntersection_Exam Title: SetIntersection Examples Author: abhay Date: Wed, Oct 27, 2010 4:40 PM DefaultSize: 48,24 NodeLocation: 112,184,1 NodeSize: 68,24 DiagState: 2,625,31,550,476,17 Variable Exploded_words Title: Exploded_words Definition: (for w:=word do \SplitText(w,'')) NodeLocation: 192,192,1 NodeSize: 48,24 ValueState: 2,102,245,623,303,0,MIDM Aliases: Alias Exploded_words1 ReformVal: [Self,word] Index word Title: word Definition: ['spanish','english','swedish'] NodeLocation: 72,192,1 NodeSize: 48,24 Aliases: Alias word1 Variable SetIntersection_Exa5 Title: SetIntersection Example 5 Description: SetIntersection(sets,i, resultIndex, keepNulls) returns the set of elements in common to all the sets along i. The first parameter, sets, is an array of sets indexed by i. When sets contains an implicit dimension, i can be omitted and the intersection is taken along the implicit dimension.~ ~ This example returns the common letters in the words "spanish", "english" and "swedish" . Definition: #SetIntersection(Exploded_words,word) NodeLocation: 320,192,1 NodeSize: 64,24 ValueState: 2,420,536,416,303,0,MIDM Variable L4 Title: L1 Definition: Sequence(1,100,2) NodeLocation: 72,256,1 NodeSize: 48,24 Variable L5 Title: L2 Definition: Sequence( 1, 100, 3 ) NodeLocation: 72,320,1 NodeSize: 48,24 WindState: 2,94,83,476,224 Variable L6 Title: L3 Definition: Sequence( 1, 100, 5 ) NodeLocation: 72,384,1 NodeSize: 48,24 Variable SetIntersection_Exa6 Title: SetIntersection Example 6 Description: SetIntersection(sets,i, resultIndex, keepNulls) returns the set of elements in common to all the sets along i. The first parameter, sets, is an array of sets indexed by i. When sets contains an implicit dimension, i can be omitted and the intersection is taken along the implicit dimension.~ ~ This example returns the common numbers in the sequences L1, L2, and L3. Definition: #SetIntersection([\L4,\L5,\L6]) NodeLocation: 320,288,1 NodeSize: 64,24 ValueState: 2,288,299,416,303,0,MIDM Variable SetIntersection_Exa7 Title: SetIntersection Example 7 Description: SetIntersection(sets,i, resultIndex, keepNulls) returns the set of elements in common to all the sets along i. The first parameter, sets, is an array of sets indexed by i. When sets contains an implicit dimension, i can be omitted and the intersection is taken along the implicit dimension.~ ~ This example returns the common numbers in the sequences L1, L2 and L3 indexed by Index_a. Definition: SetIntersection([\L4,\L5,\L6], resultIndex:Index_a) NodeLocation: 320,352,1 NodeSize: 64,24 ValueState: 2,288,299,416,303,0,MIDM Alias Index_a2 Title: Index_a Definition: 1 NodeLocation: 448,352,1 NodeSize: 48,24 NodeInfo: 1,1,0,1,1,1,0,,0, Original: Index_a Variable SetIntersection_Exa1 Title: SetIntersection Example 1 Description: SetIntersection(sets,i, resultIndex, keepNulls) returns the set of elements in common to all the sets along i. The first parameter, sets, is an array of sets indexed by i. When sets contains an implicit dimension, i can be omitted and the intersection is taken along the implicit dimension.~ ~ This example returns the common letters in the words "spanish", "english" and "swedish" . Definition: Var S1 := \(['a','b','c',null,'d']);~ Var S2 := \(['b','c',null,'e']);~ SetIntersection([S1,S2]) NodeLocation: 88,40,1 NodeSize: 64,24 ValueState: 2,420,536,416,303,0,MIDM {!40300|Att_DerefReformVal: [Sys_LocalIndex('«Unindexed»'),Undefined]} Variable SetIntersection_Exa2 Title: SetIntersection Example 2 Description: SetIntersection(sets,i, resultIndex, keepNulls) returns the set of elements in common to all the sets along i. The first parameter, sets, is an array of sets indexed by i. When sets contains an implicit dimension, i can be omitted and the intersection is taken along the implicit dimension.~ ~ This example returns the common letters in the words "spanish", "english" and "swedish" . Definition: Var S1 := \(['a','b','c',null,'d']);~ Var S2 := \(['b','c',null,'e']);~ SetIntersection([S1,S2],keepNull:true) NodeLocation: 248,40,1 NodeSize: 64,24 ValueState: 2,420,536,416,303,0,MIDM {!40300|Att_DerefReformVal: [Sys_LocalIndex('«Unindexed»'),Undefined]} Variable SetIntersection_Exa3 Title: SetIntersection Example 3 Description: SetIntersection(sets,i, resultIndex, keepNulls) returns the set of elements in common to all the sets along i. The first parameter, sets, is an array of sets indexed by i. When sets contains an implicit dimension, i can be omitted and the intersection is taken along the implicit dimension.~ ~ This example returns the common letters in the words "spanish", "english" and "swedish" . Definition: #SetIntersection([\('a'..'p'),\('k'..'z')]) NodeLocation: 392,40,1 NodeSize: 64,24 WindState: 2,23,400,476,224 ValueState: 2,420,536,416,303,0,MIDM {!40300|Att_DerefReformVal: [Sys_LocalIndex('«Unindexed»'),Undefined]} Variable SetIntersection_Exa4 Title: SetIntersection Example 4 Description: SetIntersection(sets,i, resultIndex, keepNulls) returns the set of elements in common to all the sets along i. The first parameter, sets, is an array of sets indexed by i. When sets contains an implicit dimension, i can be omitted and the intersection is taken along the implicit dimension.~ ~ This example returns the common letters in the words "spanish", "english" and "swedish" . Definition: Index n:= [2,3,5,7,11];~ Var sets := (for j:=n do \Sequence(j,10K,j));~ #SetIntersection(sets,n) NodeLocation: 88,112,1 NodeSize: 64,24 ValueState: 2,420,536,416,303,0,MIDM {!40300|Att_DerefReformVal: [Sys_LocalIndex('«Unindexed»'),Undefined]} Close SetIntersection_Exam Module SetUnion_Examples Title: SetUnion Examples Author: abhay Date: Wed, Oct 27, 2010 4:40 PM DefaultSize: 48,24 NodeLocation: 112,248,1 NodeSize: 68,24 DiagState: 2,72,105,550,300,17 Variable SetUnion_Example_3 Title: SetUnion Example 3 Description: SetUnion(sets, i, resultIndex, keepNulls) returns the set of all unique non-Null elements occurring in any of the sets along i. The first parameter is an array of sets indexed by i, or it may be an array of sets with an implicit dimension when i is omitted, in which case the union is taken along the implicit dimension.~ ~ This example returns all the letters used to spell the words "spanish", "english" and "swedish". Definition: #SetUnion(Exploded_words,word) NodeLocation: 344,120,1 NodeSize: 48,24 Alias Exploded_words1 Title: Exploded_words Definition: 1 NodeLocation: 216,120,1 NodeSize: 48,24 Original: Exploded_words Variable SetUnion_Example_4 Title: SetUnion Example 4 Description: SetUnion(sets, i, resultIndex, keepNulls) returns the set of all unique non-Null elements occurring in any of the sets along i. The first parameter is an array of sets indexed by i, or it may be an array of sets with an implicit dimension when i is omitted, in which case the union is taken along the implicit dimension.~ ~ This example returns all the letters used to spell the words "spanish", "english" and "swedish" indexed by Index_a Definition: SetUnion(Exploded_words,word,resultIndex:Index_a) NodeLocation: 344,184,1 NodeSize: 48,24 ValueState: 2,292,512,416,303,0,MIDM Alias word1 Title: word Definition: 1 NodeLocation: 88,120,1 NodeSize: 48,24 Original: word Alias Index_a1 Title: Index_a Definition: 1 NodeLocation: 88,192,1 NodeSize: 48,24 NodeInfo: 1,1,0,1,1,1,0,,0, Original: Index_a Variable SetUnion_Example_1 Title: SetUnion Example 1 Description: SetUnion(sets, i, resultIndex, keepNulls) returns the set of all unique non-Null elements occurring in any of the sets along i. The first parameter is an array of sets indexed by i, or it may be an array of sets with an implicit dimension when i is omitted, in which case the union is taken along the implicit dimension.~ ~ This example returns all the letters used to spell the words "spanish", "english" and "swedish". Definition: #SetUnion( [\('a'..'d'), \('c'..'f')]) NodeLocation: 88,48,1 NodeSize: 48,24 Variable SetUnion_Example_2 Title: SetUnion Example 2 Description: SetUnion(sets, i, resultIndex, keepNulls) returns the set of all unique non-Null elements occurring in any of the sets along i. The first parameter is an array of sets indexed by i, or it may be an array of sets with an implicit dimension when i is omitted, in which case the union is taken along the implicit dimension.~ ~ This example returns all the letters used to spell the words "spanish", "english" and "swedish". Definition: Index m := Sequence(1-Jan-2011,1-May-2011,dateUnit:'M');~ index d := [0,14];~ #SetUnion(SetUnion(\[d](m+d),d),m) NodeLocation: 208,48,1 NodeSize: 48,24 Close SetUnion_Examples Module SetDifference_Examp2 Title: SetDifference Examples Author: abhay Date: Wed, Oct 27, 2010 4:40 PM DefaultSize: 48,24 NodeLocation: 112,312,1 NodeSize: 68,24 DiagState: 2,109,253,793,300,17 Variable SetDifference_Exampl Title: SetDifference Example 1 Description: SetDifference(originalSet, remove, remove, remove, ..., resultIndex,keepNulls) Returns the set of non-Null elements in originalSet that do not appear in any of the other remove sets. The result is a reference to a list (a set) unless the optional resultIndex is specified, in which case the result is indexed by resultIndex. Null value are always removed unless the optional keepNulls parameter is specified as true.~ ~ This example returns the number in \(1..10) that are not in \Sequence(2, 10, 2) and \Sequence(3,10,3). Definition: #SetDifference(\(1..10),\Sequence(2,10,2),\Sequence(3,10,3)) NodeLocation: 112,48,1 NodeSize: 68,24 Variable SetDifference_Examp1 Title: SetDifference Example 3 Description: SetDifference(originalSet, remove, remove, remove, ..., resultIndex,keepNulls) Returns the set of non-Null elements in originalSet that do not appear in any of the other remove sets. The result is a reference to a list (a set) unless the optional resultIndex is specified, in which case the result is indexed by resultIndex. Null value are always removed unless the optional keepNulls parameter is specified as true.~ ~ This example show how the function SetDifference can be used to eliminate duplicate members from a list. Definition: #SetDifference(S4) NodeLocation: 280,120,1 NodeSize: 72,24 Variable S4 Title: S4 Definition: \Mod( (1..100)^2, 11); NodeLocation: 112,120,1 NodeSize: 72,24 ValueState: 2,160,171,416,303,0,MIDM Variable SetDifference_Examp3 Title: SetDifference Example 2 Description: SetDifference(originalSet, remove, remove, remove, ..., resultIndex,keepNulls) Returns the set of non-Null elements in originalSet that do not appear in any of the other remove sets. The result is a reference to a list (a set) unless the optional resultIndex is specified, in which case the result is indexed by resultIndex. Null value are always removed unless the optional keepNulls parameter is specified as true.~ ~ This example returns the number in \(1..10) that are not in \Sequence(2, 10, 2) and \Sequence(3,10,3). Definition: Index I := 1..5;~ SetDifference(\(1..10),\Sequence(2,10,2),\Sequence(3,10,3),resultIndex:I) NodeLocation: 280,48,1 NodeSize: 72,24 ValueState: 2,104,107,416,303,0,MIDM ReformVal: [Sys_LocalIndex('I'),Undefined] Variable SetDifference_to_rem Title: SetDifference to remove duplicates Definition: Var L := [Null,'a','b','c','d','b','c','d'];~ #SetDifference(\L) NodeLocation: 464,48,1 NodeSize: 80,24 Close SetDifference_Examp2 Variable Creating_a_set_from_ Title: Creating a set from an array Definition: \[Index_a]Array_s NodeLocation: 312,56,1 NodeSize: 56,32 ValueState: 2,676,33,337,133,0,MIDM ReformVal: [Index_b,Undefined] Close Set_Functions Close Chapter_13