Array Functions

ეს კატეგორია შეიცავს მასივის ფუნქციებს.

რა არის მასივი?

მასივი არის ელცხრილში დაკავშირებული უჯრების დიაპაზონი, მნიშვნელობებით. კვადრატული დიაპაზონი 3 სვეტით და 3 უჯრით არის 3 x 3 მასივი:

A

B

C

1

7

31

33

2

95

17

2

3

5

10

50


უმცირესი მასივია 1 x 2 ან 2 x 1 მასივი ორი უჯრით.

რა არის მასივის ფორმულა?

A formula in which the individual values in a cell range are evaluated is referred to as an array formula. The difference between an array formula and other formulas is that the array formula deals with several values simultaneously instead of just one.

მასივის ფორმულას შეუძლია არა მხოლოდ რამდენიმე მნიშვნელობის დამუშავება, არამედ მას ასევე შეუძლია რამდენიმე მნიშვნელობის დაბრუნება. მასივის ფორმულის შედეგიც მასივია.

To multiply the values in the individual cells by 10 in the above array, you do not need to apply a formula to each individual cell or value. Instead you just need to use a single array formula. Select a range of 3 x 3 cells on another part of the spreadsheet, enter the formula =10*A1:C3 and confirm this entry using the key combination + Shift + Enter. The result is a 3 x 3 array in which the individual values in the cell range (A1:C3) are multiplied by a factor of 10.

In addition to multiplication, you can also use other operators on the reference range (an array). With LibreOffice Calc, you can add (+), subtract (-), multiply (*), divide (/), use exponents (^), concatenation (&) and comparisons (=, <>, <, >, <=, >=). The operators can be used on each individual value in the cell range and return the result as an array if the array formula was entered.

Comparison operators in an array formula treat empty cells in the same way as in a normal formula, that is, either as zero or as an empty string. For example, if cells A1 and A2 are empty the array formulas {=A1:A2=""} and {=A1:A2=0} will both return a 1 column 2 row array of cells containing TRUE.

როდის იყენებთ მასივის ფორმულებს?

Use array formulas if you have to repeat calculations using different values. If you decide to change the calculation method later, you only have to update the array formula. To add an array formula, select the entire array range and then make the required change to the array formula.

Array formulas are also a space saving option when several values must be calculated, since they are not very memory-intensive. In addition, arrays are an essential tool for carrying out complex calculations, because you can have several cell ranges included in your calculations. LibreOffice has different math functions for arrays, such as the MMULT function for multiplying two arrays or the SUMPRODUCT function for calculating the scalar products of two arrays.

LibreOffice Calc-ში მასივის ფორმულების გამოყენება

You can also create a "normal" formula in which the reference range, such as parameters, indicate an array formula. The result is obtained from the intersection of the reference range and the rows or columns in which the formula is found. If there is no intersection or if the range at the intersection covers several rows or columns, a #VALUE! error message appears. The following example illustrates this concept:

მასივის ფორმულების შექმნა

If you create an array formula using the Function Wizard, you must mark the Array check box each time so that the results are returned in an array. Otherwise, only the value in the upper-left cell of the array being calculated is returned.

If you enter the array formula directly into the cell, you must use the key combination Shift + + Enter instead of the Enter key. Only then does the formula become an array formula.

შენიშვნის ხატულა

მასივის ფორმულა არის ფიგურულ ფრჩხილებში LibreOffice Calc-ში. მასივის ფორმულის შეყვანა ფიგურული ფრჩხილების ხელით შეყვანით არ შეიძლება.


გავრთხილების ხატულა

The cells in a results array are automatically protected against changes. However, you can edit or copy the array formula by selecting the entire array cell range.


Using Inline Array Constants in Formulas

Calc supports inline matrix/array constants in formulas. An inline array is surrounded by curly braces '{' and '}'. Elements can be each a number (including negatives), a logical constant (TRUE, FALSE), or a literal string. Non-constant expressions are not allowed. Arrays can be entered with one or more rows, and one or more columns. All rows must consist of the same number of elements, all columns must consist of the same number of elements.

The column separator (separating elements in one row) and the row separator are language and locale dependent. But in this help content, the ';' semicolon and '|' pipe symbol are used to indicate the column and row separators, respectively. For example, in the English locale, the ',' comma is used as the column separator, while the ';' semicolon is used as the row separator.

რჩევის ხატულა

You can view and change the row and column separator in - Calc - Formula - Separators.


Arrays can not be nested.

სახელი

={1;2;3}

An array with one row consisting of the three numbers 1, 2, and 3.

To enter this array constant, you select three cells in a row, then you type the formula ={1;2;3} using the curly braces and the semicolons, then press + Shift + Enter.

={1;2;3|4;5;6}

An array with two rows and three values in each row.

={0;1;2|FALSE;TRUE;"two"}

A mixed data array.

=SIN({1;2;3})

Entered as a matrix formula, delivers the result of three SIN calculations with the arguments 1, 2, and 3.

მასივის ფორმულების რედაქტირება

  1. Select the cell range or array containing the array formula. To select the whole array, position the cell cursor inside the array range, then press + /, where / is the Division key on the numeric keypad.

  2. Either press F2 or position the cursor in the input line. Both of these actions let you edit the formula.

  3. After you have made changes, press + Shift + Enter.

რჩევის ხატულა

თქვენ შეგიძლიათ მასივის სხვადასხვა ნაწილების გაფორმება. მაგალითად შეგიძლიათ შეცვალოთ შრიფტის ფერი. მონიშნეთ უჯრათა დიაპაზონი და შეცვალეთ სასურველი ატრიბუტი.


მასივის ფორმულების ასლი

  1. მონიშნეთ ფორმულის შემცველი უჯრათა დიაპაზონი ან მასივი.

  2. Either press F2 or position the cursor in the input line.

  3. Copy the formula into the input line by pressing + C.

  4. Select a range of cells where you want to insert the array formula and either press F2 or position the cursor in the input line.

  5. Paste the formula by pressing + V in the selected space and confirm it by pressing + Shift + Enter. The selected range now contains the array formula.

მასივის დიაპაზონის გამართვა

თი გსურთ მასივის გამონატანის რედაქტირება გააკეთეთ შემდეგი:

  1. მონიშნეთ ფორმულის შემცველი უჯრათა დიაპაზონი ან მასივი.

  2. მონიშნულის ქვემოთ მარჯვნივ იხილავთ მცირე ხატულად, რომლითაც შეძლებთ დიაპაზონის მაშტაბირებას თაგვის მეშვეობით.

შენიშვნის ხატულა

When you adjust the array range, the array formula will not automatically be adjusted. You are only changing the range in which the result will appear.


By holding down the key, you can create a copy of the array formula in the given range.

მასივის პირობითი გამოთვლა

A conditional array calculation is an array or matrix formula that includes an IF() or CHOOSE() function. The condition argument in the formula is an area reference or a matrix result.

In the following example, the >0 test of the {=IF(A1:A3>0;"yes";"no")} formula is applied to each cell in the range A1:A3 and the result is copied to the corresponding cell.

A

B (ფორმულა)

B (შედეგი)

1

1

{=IF(A1:A3>0;"დიახ";"არა")}

დიახ

2

0

{=IF(A1:A3>0;"დიახ";"არა")}

არა

3

1

{=IF(A1:A3>0;"დიახ";"არა")}

დიახ


CORREL COVAR FORECAST FTEST INTERCEPT MDETERM MINVERSE MMULT MODE PEARSON PROB RSQ SLOPE STEYX SUMPRODUCT SUMX2MY2 SUMX2PY2 SUMXMY2 TTEST არე - ცხრილი შეიცავს მაგალითი -:

A

B (ფორმულა)

B (შედეგი)

C (ძალდატანებული მასივის ფორმულა)

C (შედეგი)

1

1

=A1:A2+1

2

=SUMPRODUCT(A1:A2+1)

5

2

2

=A1:A2+1

3

=SUMPRODUCT(A1:A2+1)

5

3

=A1:A2+1

#VALUE!

=SUMPRODUCT(A1:A2+1)

5


FREQUENCY

Indicates the frequency distribution in a one-column-array. The function counts the number of values in the Data array that are within the values given by the Classes array.

Syntax

FREQUENCY(მონაცემები; კლასები)

Data represents the reference to the values to be counted.

მონაცემები_1 მონაცემთა პირველი წყობის მასივს ასახავს.

შენიშვნის ხატულა

თქვენ შეგიძლიათ მასივის ფუნქციებით სარგებლობაზე ზოგადი ინფორმაცია ნახოთ გვერდის დასაწყისში.


Example

ცხრილი A სვეტი B შეიცავს -თვის კლასები -სკენ დუ A -სკენ დუ FREQUENCY რიცხვი - ცოტა ან ტოლია -სკენ დუ ტოლია FREQUENCY მეორე რიცხვი - ან ან ტოლია -სკენ ტექსტი დუ B6 ტოლია -თვის.

A

B

C

1

12

5

1

2

8

10

3

3

24

15

2

4

11

20

3

5

5

25

1

6

20

>25

1

7

16

8

9

9

7

10

16

11

33


Select a single column range in which to enter the frequency according to the class limits. You must select one field more than the class ceiling. In this example, select the range C1:C6. Call up the FREQUENCY function in the Function Wizard. Select the Data range in (A1:A11), and then the Classes range in which you entered the class limits (B1:B6). Select the Array check box and click OK. You will see the frequency count in the range C1:C6.

More explanations on top of this page.

GROWTH

გამოთვლის მასივების საჩვენებელი კურსის წერტილებს.

Syntax

GROWTH(DataY; DataX; NewDataX; FunctionType)

მონაცემი_Yასახავს Y მონაცემთა მასივს.

მონაცემი_X (არასავალდებულო) ასახავს X მონაცემთა მასივს.

ახალი_მონაცემი_X (არასავალდებულო) ასახავს X მონაცემთა მასივს, რომელშიც მნიშვნელობები გადაანგარიშებულია.

FunctionType (optional). If FunctionType = 0, functions in the form y = m^x will be calculated. Otherwise, y = b*m^x functions will be calculated.

In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone.

More explanations on top of this page.

Example

This function returns an array and is handled in the same way as the other array functions. Select a range where you want the answers to appear and select the function. Select DataY. Enter any other parameters, mark Array and click OK.

LINEST

Returns a table of statistics for a straight line that best fits a data set.

Syntax

LINEST(მონაცემები_Y; მონაცემები_X; ხაზური_ტიპი; სტატისტიკა)

data_Y is a single row or column range specifying the y coordinates in a set of data points.

data_X is a corresponding single row or column range specifying the x coordinates. If data_X is omitted it defaults to 1, 2, 3, ..., n. If there is more than one set of variables data_X may be a range with corresponding multiple rows or columns.

LINEST finds a straight line y = a + bx that best fits the data, using linear regression (the "least squares" method). With more than one set of variables the straight line is of the form y = a + b1x1 + b2x2 ... + bnxn.

If linearType is FALSE the straight line found is forced to pass through the origin (the constant a is zero; y = bx). If omitted, linearType defaults to TRUE (the line is not forced through the origin).

If stats is omitted or FALSE only the top line of the statistics table is returned. If TRUE the entire table is returned.

LINEST returns a table (array) of statistics as below and must be entered as an array formula (for example by using + Shift + Return rather than just Return).

In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone.

More explanations on top of this page.

Example

This function returns an array and is handled in the same way as the other array functions. Select a range for the answers and then the function. Select data_Y. If you want, you can enter other parameters. Select Array and click OK.

The results returned by the system (if stats = 0), will at least show the slope of the regression line and its intersection with the Y axis. If stats does not equal 0, other results are to be displayed.

სხვა LINEST შედეგები:

შემდეგი მაგალითების გამოცდა:

A

B

C

D

E

F

G

1

x1

x2

y

LINEST value

2

4

7

100

4,17

-3,48

82,33

3

5

9

105

5,46

10,96

9,35

4

6

11

104

0,87

5,06

#NA

5

7

12

108

13,21

4

#NA

6

8

15

111

675,45

102,26

#NA

7

9

17

120

8

10

19

133


Column A contains several X1 values, column B several X2 values and column C the Y values. You have already entered these values in your spreadsheet. You have now set up E2:G6 in the spreadsheet and activated the Function Wizard. For the LINEST function to work, you must have marked the Array check box in the Function Wizard. Next, select the following values in the spreadsheet (or enter them using the keyboard):

მონაცემი_Y არის C2:C8

მონაცემი_X არის A2:B8

წრფივი ტიპი და სტატუსი მინიჭებულია 1.

As soon as you click OK, LibreOffice Calc will fill the above example with the LINEST values as shown in the example.

The formula in the Formula bar corresponds to each cell of the LINEST array {=LINEST(C2:C8;A2:B8;1;1)}.

ეს ასახავს გამოთვლილ LINEST მნიშვნელობას:

E2 and F2: Slope m of the regression line y=b+m*x for the x1 and x2 values. The values are given in reverse order; that is, the slope for x2 in E2 and the slope for x1 in F2.

G2: b თანაკვეთა y ღერძზე.

E3 და F3: დახრის მნიშვნელობის სტანდარტული შეცდომა.

G3: კვეთის სტანდარტული შეცდომა

E4: RSQ

F4: Y მნიშვნელობის რეგრესიული გამოთვლის სტანდარტული შეცდომა.

E5: ვარიაციული ანალიზის F მნიშვნელობა.

F5: ვარიაციის ანალიზის თავისუფლების ხარისხი.

E6: The sum of the squared deviation of the estimated Y values from their linear mean.

F6: The sum of the squared deviation of the estimated Y value from the given Y values.

More explanations on top of this page.

LOGEST

This function calculates the adjustment of the entered data as an exponential regression curve (y=b*m^x).

Syntax

LOGEST(მონაცემი_Y; მონაცემი_X; ფუნქციის ტიპი; სტატისტიკა)

მონაცემი_Yასახავს Y მონაცემთა მასივს.

მონაცემი_X (არასავალდებულო) ასახავს X მონაცემთა მასივს.

ფუნქციის_ტიპი(არასავალდებულო) თუ ფუნქციის_ტიპი = 0, ფუნქცია ფორმაში y = m^x გამოითვლება. სხვაგვარად y = b*m^x გამოითვლება.

Stats (optional). If Stats=0, only the regression coefficient is calculated.

In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone.

More explanations on top of this page.

Example

იხილეთ LINEST. თუმცა კვადრატების ჯამი არ დამრგვალდება.

MDETERM

აბრუნებს მასივის განმსაზღვრელ მასივს. ეს ფუნქცია აბრუნებს მიმდინარე უჯრაში მნიშვნელობას, იგი არაა საჭირო შედეგების დიაპაზონის გარდასაზღვრად.

Syntax

MDETERM(მასივი)

მასივი ასახავს კვადრატულ მასივს სადაც დეტერმინანტებია განსაზღვრული.

შენიშვნის ხატულა

You can find a general introduction to using Array functions on top of this page.


More explanations on top of this page.

MINVERSE

აბრუნებს შებრუნებულ მასივს.

Syntax

MINVERSE(მასივი)

მასივი ასახავს კვადრატულ მასივს რომელიც უნდა შებრუნდეს.

More explanations on top of this page.

Example

Select a square range and select MINVERSE. Select the output array, select the Array field and click OK.

MMULT

Calculates the array product of two arrays. The number of columns for array 1 must match the number of rows for array 2. The square array has an equal number of rows and columns.

Syntax

MMULT(მასივი; მასივი)

მასივი ასახავს მასივთა ნამრავლის პირველ მასივს.

მასივი მეორე ადგილზე წარმოადგენს მეორე მასივს რიგების იგივე რაოდენობით.

შენიშვნის ხატულა

More explanations on top of this page.


Example

Select a square range. Choose the MMULT function. Select the first Array, then select the second Array. Using Function Wizard, mark the Array check box. Click OK. The output array will appear in the first selected range.

MUNIT

Returns the unitary square array of a certain size. The unitary array is a square array where the main diagonal elements equal 1 and all other array elements are equal to 0.

Syntax

MUNIT(ზომები)

Dimensions refers to the size of the array unit.

შენიშვნის ხატულა

თქვენ შეგიძლიათ მასივის ფუნქციებით სარგებლობაზე ზოგადი ინფორმაცია ნახოთ გვერდის დასაწყისში.


Example

Select a square range within the spreadsheet, for example, from A1 to E5.

Without deselecting the range, select the MUNIT function. Mark the Array check box. Enter the desired dimensions for the array unit, in this case 5, and click OK.

You can also enter the =MUNIT(5) formula in the last cell of the selected range (E5), and press .

You now see a unit array with a range of A1:E5.

More explanations on top of this page.

SUMPRODUCT

Multiplies corresponding elements in the given arrays, and returns the sum of those products.

Syntax

SUMPRODUCT(Array1; Array2; ...; Array30)

Array1, Array2; ...; Array30 represent arrays whose corresponding elements are to be multiplied.

At least one array must be part of the argument list. If only one array is given, all array elements are summed.

Example

A

B

C

D

1

2

3

4

5

2

6

7

8

9

3

10

11

12

13


=SUMPRODUCT(A1:B3;C1:D3) returns 397.

გამოთვლა: A1*C1 + B1*D1 + A2*C2 + B2*D2 + A3*C3 + B3*D3

You can use SUMPRODUCT to calculate the scalar product of two vectors.

შენიშვნის ხატულა

SUMPRODUCT returns a single number, it is not necessary to enter the function as an array function.


More explanations on top of this page.

SUMX2MY2

ორი მასივის დაკავშირებული მნიშვნელობების კვადრატებს აჯამებს.

Syntax

SUMX2PY2(მასივი X; მასივი Y)

მასივი X ასახავს პირველ მასივს რომლის არგუმენტები უნდა აკვადრატდეს და დაჯამდეს.

მასივი Y ასახავს მეორე მასივს რომლის არგუმენტები უნდა აკვადრატდეს და დაჯამდეს.

More explanations on top of this page.

SUMX2PY2

ორი მასივის დაკავშირებული მნიშვნელობების კვადრატებს აჯამებს.

Syntax

SUMX2PY2(მასივი X; მასივი Y)

მასივი X ასახავს პირველ მასივს რომლის არგუმენტები უნდა აკვადრატდეს და დაჯამდეს.

მასივი Y ასახავს მეორე მასივს რომლის არგუმენტები უნდა აკვადრატდეს და დაჯამდეს.

More explanations on top of this page.

SUMXMY2

ორი მასივის დაკავშირებული მნიშვნელობების კვადრატებს აჯამებს.

Syntax

SUMXMY2(მასივი X; მასივი Y)

მასივი X ასახავს პირველ მასივს რომლის არგუმენტები უნდა აკვადრატდეს და გამოაკლდეს.

მასივი Y ასახავს მეორე მასივს რომლის არგუმენტები უნდა აკვადრატდეს და გამოაკლდეს.

More explanations on top of this page.

TRANSPOSE

გარდაქმნის მასივის რიგებს და სვეტებს.

Syntax

TRANSPOSE(მასივი)

მასივი ასახავს გარდასაქმნელ მასივს ელცხრილში.

შენიშვნის ხატულა

თქვენ შეგიძლიათ მასივის ფუნქციებით სარგებლობაზე ზოგადი ინფორმაცია ნახოთ გვერდის დასაწყისში.


Example

In the spreadsheet, select the range in which the transposed array can appear. If the original array has n rows and m columns, your selected range must have at least m rows and n columns. Then enter the formula directly, select the original array and press . Or, if you are using the Function Wizard, mark the Array check box. The transposed array appears in the selected target range and is protected automatically against changes.

A

B

C

D

1

2

3

4

5

2

6

7

8

9


The above table is 2 rows, 4 columns. In order to transpose it, you must select 4 rows, 2 columns. Assuming you want to transpose the above table to the range A7:B10 (4 rows, 2 columns) you must select the entire range and then enter the following:

TRANSPOSE(A1:D2)

Then make sure to enter it as matrix formula with . The result will be as follows:

A

B

7

2

6

8

3

7

9

4

8

10

5

9


TREND

აბრუნებს წრფივი კურსის მნიშვნელობებს.

Syntax

TREND(მონაცემი_Y; მონაცემი_X; ახალი მონაცემი_X; წრფივი ტიპი)

მონაცემი_Yასახავს Y მონაცემთა მასივს.

მონაცემი_X (არასავალდებულო) ასახავს X მონაცემთა მასივს.

ახალი მონაცემი_X (არასავალდებულო) ასახავს X მონაცემების მასივს, რომელიც გამოიყენება მნიშვნელობების გადასაანგარიშებლად.

LinearType (optional). If LinearType = 0, then lines will be calculated through the zero point. Otherwise, offset lines will also be calculated. The default is LinearType <> 0.

In the LibreOffice Calc functions, parameters marked as "optional" can be left out only when no parameter follows. For example, in a function with four parameters, where the last two parameters are marked as "optional", you can leave out parameter 4 or parameters 3 and 4, but you cannot leave out parameter 3 alone.

More explanations on top of this page.

Example

Select a spreadsheet range in which the trend data will appear. Select the function. Enter the output data or select it with the mouse. Mark the Array field, click OK. The trend data calculated from the output data is displayed.

Please support us!