Array Functions

Ova kategorija sadzi niz funkcije.

Sta je niz?

Niz je povezani rang celija tabele koje sadrze vrijednosti. kvadratni rang 3 reda i 3 kolone je 3 x 3 niz:

A

B

C

D

E

1

7

31

33

2

95

17

2

3

5

10

50

4


Najmanji moguci niz je 1 x 2 or 2 x 1 niz sa dvije celije.

Sta je formila niza?

Formula u kojoj su individualne vrijednosti u celiji odredjene odnosi se na formulu niza. Razlika izmedju formule niza i drugih formula je u tome sto formul niza operira sa nekoliko vrijednosti istovremeno, umjesto sa jednom.

Ne samo da formula niza moze procesuirati vise vrijednosti, ona takodjer i vraca nekoliko vrijednosti. Rezultat formule niza je takodjer niz.

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.

U dadatku mnozenju, mozete takodjer koristiti operacije navedene u rangu(niza). Sa LibreOffice Calc, mozete dodati (+), oduzeti(-), pomnoziti (*), podijeliti (/), koristiti eksponent (^), sastavljanje (&) i poredjenje (=, <>, <, >, <=, >=). Operacijemogu biti koristene na svaku pojedinacnu vrijednost celijskog ranga i vratiti rezultat kao niz ako je formula niza vec unesena.

Operatori poredjenja u formuli niza tretiraju na isti nacin normalnu formulu, to jeste, ili nulu ili prezan znak. Na primjer, ako su celijeA1 i A2 prazne, formule niza {=A1:A2=""} and {=A1:A2=0} ce obje vratiti 1 cloonu i 2 red niza celija koje sadrze TRUE.

Kada se koriste formule niza?

Koristite formuleniza ako trebate ponavljati racunanje za razlicite vrijednosti.Ako kasnije odlucite promjeniti metod racunanja, trebate samo izmjeniti formulu. Za sabiranje,formula niza, oznacite rang niza i napravite potrebne izmjene u formuli niza.

Formule niza su takodjer i opcija koja stedi prostor kada nekoliko vrijednosti treba biti izracunato, jer nisu memorijski jako zahtjevne. U dodatku, nizovi su osnovni alat za izvodjene kompleksnih racunanja, jer mozete imat nekoliko celijskih rangova ukljucenih u racunanje. LibreOfficeima drugacije matematicke funkcije za nizove, kao sto je MMULT funkcija za mnozenje dva niza, ili SUMPRODUCT za racunanje skalarnog proizvoda dva niza.

Koristenje formula niza u LibreOffice Calc

Implicit intersection of array formulas

You can also create a "normal" formula in which the reference range, such as parameters, indicate an array formula. This formula is also known as "implicit intersection" of 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:

In the table above, place the array formula in D1:

{=A1:A3 + 100}

Cells D1, D2, D3 have values 107, 195, 105 respectively.

Insert the formula below in E2, do not enter as array formula.

=A1:A3 + 100

Cells E1 and E3 are empty, Cell E2 has value 195. This is the implicit intersection of array formulas.

Insert formula below in E4, as in E2.

=A1:A3 + 100

Cell E4 display #VALUE!. Row 4 is out of the range A1:A3 of the formula.

Kreiranje formule niza

Ako kreirate formulu niza koristeciČarobnjak za funkcije, morate oznaciti Matrica u kucici tako da je vraceni rezultat u obliku niza . Inace, samo ce vrijednosti u gornjoj-lijevoj celiji niza biti izracunate i vracene.

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.

note

Formula niza se pojavljuje u zagradama (okrugle zagrade) u LibreOffice Calc. Ne mozete kreirati formuluniza rucnim unosenjem zagrada.


warning

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


Koristenje konstanti linijskog niza u formuli.

Calc supports inline matrix/array constants in formulae. An inline array is enclosed with braces (curly brackets) '{' 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.

tip

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


Niz ne moze bitiugnijezden.

Examples:

={1;2;3}

Niz od jednog reda sastoji se od brojeva 1, 2, i 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}

Niz sa 2 reda i 3 vrijednosti u svakom redu.

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

Izmjesani podaci niza.

=SIN({1;2;3})

Uneseno kao formulamatrice, vraca rezultat tri SIN kalkulacije sa argumentima 1, 2, i 3.

Uredjivanje formule niza

  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.

tip

Mozete mjenjati odvojene dijelove niza. Na primjer,mozete mjenjati boju slova. Oznacite celijski rang i onda mjenjajte atribut koji zelite.


Deleting Array Formulae

  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. Press Delete to delete the array contents, including the array formula, or press Backspace and this brings up the Delete Contents dialog box. Select Formula or Delete All and click OK.

Kopiranje formule niza

  1. Select the cell range or array containing the array formula.

  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.

Prilagodjavanje ranga niza

If you want to edit the output array, do the following:

  1. Select the cell range or array containing the array formula.

  2. Below the selection, to the right, you will see a small icon with which you can zoom in or out on the range using your mouse.

note

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.

Conditional Array Calculations

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.

U sljedecem primjeru,>0 test {=IF(A1:A3>0; "yes"; "no")} je primjenjena na svaku celiku u rangu A1:A3 i rezultat je kopiran u odgovarajucu celiju.

A

B (formula)

C (rezultat)

1

1

{=IF(A1:A3>0; "yes"; "no")}

yes

2

0

{=IF(A1:A3>0; "yes"; "no")}

no

3

1

{=IF(A1:A3>0; "yes"; "no")}

yes


The following functions provide forced array handling: CORREL, COVAR, FORECAST, FTEST, INTERCEPT, MDETERM, MINVERSE, MMULT, MODE, PEARSON, PROB, RSQ, SLOPE, STEYX, SUMPRODUCT, SUMX2MY2, SUMX2PY2, SUMXMY2, TTEST. If you use area references as arguments when you call one of these functions, the functions behave as array functions. The following table provides an example of forced array handling:

A

B (formula)

C (rezultat)

C (izforsirana formula niza)

C (rezultat)

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; Classes)

Podaci je niz koji predstavlja referencu vrijednostim koje se prebrojavaju.

Classes je niz sa krajnjim vrijednostima.

note

This function ignores any text or empty cell within a data range. If you suspect wrong results from this function, look for text in the data ranges. To highlight text contents in a data range, use the value highlighting feature.


note

Možete pronaći generalni uvod u Array funkcije na vrhu ove stranice.


Example

U idučoj tabeli, kolona A izlistava nesortirane mjerne vrijednosti. Kolona B sadrži gornje granice koje ste unijeli iz klasa u koje želite da dijelite podatke u koloni A. Prema granici unesenoj u B1, FREQUENCY funkcija vrača vrijednost broja mjernih vrijednosti koje su manje ili jednake 5. Budući da je granica u B2 10, FREQUENCY funkcija vrača drugi rezultat kao broj mjernih vrijednosti koje su veče od 5 i manje ili jednake 10. Tekst koji ste unijeli u B6, ">25", je samo za referentne svrhe.

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


Izaberite jednu kolonu u rasponu u kojeg će te unijeti frekvenciju shodnu klasnim ograničenjima. Morate izabrati jedno polje veće ili manje od klasnog plafona. U ovom primjeru, izaberite raspon C1:C6. Pozovite FREQUENCY funkciju u Čarobnjak za funkcije. Izaberite Podaci niz u (A1:A11) i potom Classes raspon u kojem ste unjeli klasna ograničenja (B1:B6). Izaberite Matrica check box and kliknite UREDU. Vidjet će te frekvencijski prebroj u nizu C1:C6.

More explanations on top of this page.

GROWTH

Kalkuliše tačke eksponencijalnog trenda u nizu.

Syntax

GROWTH(DataY [; [ DataX ] [; [ NewDataX ] [; FunctionType ] ] ])

Data_Y je y-podaci niz.

Data_X (po mogućnosti) je x-podaci niz.

New_data_X (po mogućnosti) predstavlja x-podaci niz, u kojem će vrijednosti bit rekalkulisane.

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

Vraća tabelu statistike za pravu liniju koja najbolje odgovara podacima.

Syntax

LINEST(data_Y [; data_X [; linearType [; stats]]])

podaci_Y jedan red ili kolona koja specificira y koordinate za skup tačaka podataka.

podaci_x je korespondirajuči red ili kolonski raspon koji specificira x koordinate. Ako podaci_x nije prisutan, default vrijednost je 1, 2, 3, ..., n. Ako postoji više od jednog skupa podataka, podaci_x može imati raspon koji odgovara više redova ili kolona.

LINEST pronalazi pravu y = a + bx koja najbolje odgovara podacima, koristeči linearnu regresiju (the "least squares" metoda). Sa više od jednog skupa promjenljivih, prava je oblika y = a + b1*x1 + b2*x2 ... + bn*xn.

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

Ova funkcija vraća niz i upravlja se istim načinom kao i ostele array funkcije. Izaberi podaci_Y. Ako želiš, možeš unijeti druge parametre. Izaberi Matrica and klikni UREDU.

Rezultat sistema (ako statistika = 0), će ako ništa prikazati nagib regresijske linije i njenu intersekciju sa Y osom. Ako statistika nije jednak 0, drugi rezultati će biti prikazani.

Drugi LINEST rezultati:

Pregledajte iduće primjere:

A

B

C

D

E

F

G

1

-3,48

-3,48

-3,48

0.00 novcanih jedinica

2

4

7

100

-3,48

-3,48

-3,48

3

5

9

105

-3,48

-10000

-3,48

4

6

11

104

-3,48

-3,48

-3,48

5

7

12

108

-3,48

4

-3,48

6

8

15

111

-3,48

-10000

-3,48

7

9

17

120

8

10

19

133


Kolona A sadrži nekoliko X1 vrijednosti, kolona B nekoliko X2 vrijednosti i kolona C nekoliko Y vrijednosti. Vi ste već unijeli ove vrijednosti u vaš spreadsheet. Sada se postavili E2:G6 u spreadsheet-u i aktivirali Čarobnjak za funkcije. Za LINEST funkciju da radi, morate obilježiti Matrica kvadratič u Čarobnjak za funkcije. Slijedeće, izaberite iduće vrijednosti u spreadsheet-u (ili ih unesite pomoću tastature):

podaci_Y je C2:C8

podaci_x je A2:B8

Linear_type i statistika su oboje postavljeni na 1.

Čim pritisnete UREDU, LibreOffice Calc će pronaći gore navedeni primjer sa LINEST vrijednostima kao što su prikazane u primjeru.

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

Reprezentira kalkulisane LINEST vrijednosti:

E2 and F2: Nagib m regresijske linije y = b + m*x za x1 i x2 vrijednosti. Ove vrijednosti su date obrnutim redosljedom; tj., nagib za x2 u E2 i nagib x1 u F2.

G2: Intersekcija b sa y osom.

E3 i F3: Standardna greška vrijednosti nagiba.

G3: Standardna greška intercept-a

E4: RSQ

F4: Standardna grešla regresije kalkulisana za Y vrijednost.

E5: F vrijednost iz variance analize.

F5: Stepeni slobode za analizu varijanse.

E6: Suma kvadratne devijacije od očekivanih Y vrijednosti iz linearnog mean-a.

F6: Suma kvadratne devijacije očekivane Y vrijednosti za date Y vrijednosti.

More explanations on top of this page.

LOGEST

Ova funkcija kalkuliše promjene unesenih podataka kao eksponencijalna regresijska kriva (y=b*m^x).

Syntax

LOGEST(DataY [; DataX [; FunctionType [; Stats]]])

Data_Y je y-podaci niz.

Data_X (po mogućnosti) je x-podaci niz.

Function_type (po mogućnosti). Ako je Function_type = 0, funkcija oblika y = m^x će biti izračunata. Inače, y = b * m^x funkcije će biti izračunate.

Stats (optional). Ako je Stats=0, samo regresijski koeficijent je izračunat.

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

Pogledajte LINEST. Međutim, kvadratna suma neće biti vračena.

MDETERM

Vraća determinantu niza. Ova funkcija vraća vrijednost u trenutnoj čeliji; nije potrebno da definišete raspon za rezultat.

Syntax

MDETERM(Array)

Matrica je kvadratni niz u kojem su determinante definisane.

note

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


More explanations on top of this page.

MINVERSE

Vraća inverzni niz.

Syntax

MINVERSE(Array)

Matrica kvadratni niz koji će biti invertovan.

More explanations on top of this page.

Example

Izaberite kvadratni raspone i izaberite MINVERSE. Izaberite izlazni niz, izaberite Matrica polje i kliknite UREDU.

MMULT

Kalkuliše niz kao produkt dva niza. Broj kolona za niz 1 mora da odgovara broju redova niza 2. Kvadratni niz ima jednak broj kolona i redova.

Syntax

MMULT(Array 1; Array 2)

Array 1 represents the first array used in the array product.

Array 2 represents the second array with the same number of rows.

note

More explanations on top of this page.


Example

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

MUNIT

Vrača unitarni kvadratni niz određene veličine. Unitarni niz je kvadratni niz gdje je glavna dijagonala elemenata jednaka 1 i svi ostali članovi niza su jednaki 0.

Syntax

MUNIT(Dimensions)

Dimenzije referira veličini jedinice niza.

note

Možete pronaći generalni uvod u Array funkcije na vrhu ove stranice.


Example

Izaberi kvadratni niz unutar spreadsheet-a, za primjer, od A1 do A5.

Bez deselektiranja niza, izaberi MUNIT funkciju. Označi Matrica kvadratič. Unesi željene dimenzije za jedinicu niza, u ovom slučaju 5 i pritisni UREDU.

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

Možete vidjeti jedinični niz u rasponu od A1:A5.

More explanations on top of this page.

SUMPRODUCT

Množi korespondirajuće elemente u datim nizovima, te vrača sumu tih proizvoda.

Syntax

SUMPRODUCT(Array 1[; Array 2;][...;[Array 255]])

Array 1[; Array 2;][...;[Array 255]] 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. If more than one array is given, they must all be the same size.

Example

A

B

C

D

1

2

3

4

0.00 novcanih jedinica

2

6

7

8

9

3

10

11

12

13


=SUMPRODUCT(A1:B3; C1:D3) vrača 397.

Kalkulacija: A1*C1 + B1*D1 + A2*C2 + B2*D2 + A3*C3 + B3*D3

Možete da koristite SUMPRODUC da kalkulišete skalarni proizvod dva vektora.

note

SUMPRODUCT vraća jedan broj, nije potrebno da unesete cijelu funkciju kao funkciju niza.


More explanations on top of this page.

SUMX2MY2

Vraća sumu razlike kvadrata odgovarajućih vrijednosti dva niza.

Syntax

SUMX2MY2(Array_X; Array_Y)

Array_X je prvi niz čiji elementi trebaju biti kvadrirani i sabrani.

Array_Y je drugi niz čiji elemnti trebaju biti kvadrirani i oduzeti.

More explanations on top of this page.

SUMX2PY2

Vraća sumu suma kvadrata odgovarajučih vrijednosti u dva niza.

Syntax

SUMX2PY2(Array_X; Array_Y)

Array_X je prvi niz čiji elementi trebaju biti kvadrirani i sabrani.

Array_Y je drugi niz, čiji elementi trebaju biti kvadrirani i sabrani.

More explanations on top of this page.

SUMXMY2

Dodaje kvadrate varijacije između odgovarajućih vrijednosti u dva niza.

Syntax

SUMXMY2(Array_X; Array_Y)

Array_X je prvi niz čiji elementi trebaju biti oduzeti i kvadrirani.

Array_Y predstavlja drugi niz,čiji elementi trebaju biti oduzeti i kvadrirani.

More explanations on top of this page.

TRANSPOSE

Transponira redove i kolone niza.

Syntax

TRANSPOSE(Array)

Matrica predstavlja niz u spreadsheet-u koji će biti transponovan.

note

Možete pronaći generalni uvod u Array funkcije na vrhu ove stranice.


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

Vraća vrijednost duž linearnog trenda.

Syntax

TREND(DataY [; DataX [; NewDataX [; LinearType]]])

Data_Y je y-podaci niz.

Data_X (po mogućnosti) je x-podaci niz.

New_data_X (po mogućnosti) je niz x-podataka, koje se koriste za rekalkulacije vrijednosti.

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!