Difference between revisions of "Calc/Funkcionalnosti/Matrične konstante v formulah"
Line 1: | Line 1: | ||
{{DISPLAYTITLE:Matrične konstante v formulah}} | {{DISPLAYTITLE:Matrične konstante v formulah}} | ||
− | + | Matrične konstante so implementirane z [http://www.openoffice.org/issues/show_bug.cgi?id=32342 zadevo 32342] v [http://eis.services.openoffice.org/EIS2/cws.ShowCWS?Path=SRC680%2Fjgarrays CWS jgarrays] | |
== Opis == | == Opis == | ||
− | Calc | + | Calc zdaj v formulah podpira inline matrix/array constants. 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, so that a two-dimensional array has no sparse elements. The column separator (separating elements in one row) is the ';' semicolon, the row separator is a '|' pipe symbol. They were chosen because the upcoming ODF formula specification uses these separators. Contrary to Excel, the separators are not UI-version and/or locale dependent. Arrays can not be nested. Import/export from/to Excel are implemented. |
− | 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, so that a two-dimensional array has no | + | |
− | sparse elements. The column separator (separating elements in one row) | + | |
− | is the ';' semicolon, the row separator is a '|' pipe symbol. They | + | |
− | were chosen because the upcoming ODF formula specification uses these | + | |
− | separators. Contrary to Excel, the separators are not UI-version | + | |
− | and/or locale dependent. Arrays can not be nested. Import/export | + | |
− | from/to Excel are implemented. | + | |
== Primeri == | == Primeri == | ||
− | ; ={1;2;3} : | + | ; ={1;2;3} : Matrika z eno vrstico, ki jo sestavljajo številke 1, 2 in 3. |
− | ; ={1;2;3|4;5;6} : | + | ; ={1;2;3|4;5;6} : Matrika z dvema vrsticama in tremi vrednostmi v vsaki vrstici. |
− | ; ={0;1;2|FALSE;TRUE;"two"} : | + | ; ={0;1;2|FALSE;TRUE;"two"} : Matrika z mešanimi podatki. |
− | ; =SIN({1;2;3}) : | + | ; =SIN({1;2;3}) : Če jo vnesemo kot matrično formulo, vrne rezultat treh izračunov SIN z argumenti 1, 2 in 3. |
− | ; ={1;2|4;5;6} : | + | ; ={1;2|4;5;6} : Neveljavna matrika, prvi vrstici manjka en element. To vrne napako Err:512 "Formula overflow". |
− | ; ={1;2+3} : | + | ; ={1;2+3} : Neveljavna matrika, drugi element ni konstanta. To vrne napako Err:512 "Formula overflow". |
− | ; ={1;2;{3;4;5}} : | + | ; ={1;2;{3;4;5}} : Neveljavna matrika, ugnezdene matrike niso dovoljene. To vrne napako Err:533 "Ugnezdene matrike niso podprte". To je novo sporočilo napake, namenjeno tudi prevajanju v druge jezike. |
[[Category:Calc po slovensko|Funkcionalnosti/Matrične konstante v formulah]] | [[Category:Calc po slovensko|Funkcionalnosti/Matrične konstante v formulah]] | ||
[[Category:Funkcionalnosti|Matrika]] | [[Category:Funkcionalnosti|Matrika]] |
Revision as of 12:08, 23 July 2008
Matrične konstante so implementirane z zadevo 32342 v CWS jgarrays
Opis
Calc zdaj v formulah podpira inline matrix/array constants. 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, so that a two-dimensional array has no sparse elements. The column separator (separating elements in one row) is the ';' semicolon, the row separator is a '|' pipe symbol. They were chosen because the upcoming ODF formula specification uses these separators. Contrary to Excel, the separators are not UI-version and/or locale dependent. Arrays can not be nested. Import/export from/to Excel are implemented.
Primeri
- ={1;2;3}
- Matrika z eno vrstico, ki jo sestavljajo številke 1, 2 in 3.
- ={1;2;3|4;5;6}
- Matrika z dvema vrsticama in tremi vrednostmi v vsaki vrstici.
- ={0;1;2|FALSE;TRUE;"two"}
- Matrika z mešanimi podatki.
- =SIN({1;2;3})
- Če jo vnesemo kot matrično formulo, vrne rezultat treh izračunov SIN z argumenti 1, 2 in 3.
- ={1;2|4;5;6}
- Neveljavna matrika, prvi vrstici manjka en element. To vrne napako Err:512 "Formula overflow".
- ={1;2+3}
- Neveljavna matrika, drugi element ni konstanta. To vrne napako Err:512 "Formula overflow".
- ={1;2;{3;4;5}}
- Neveljavna matrika, ugnezdene matrike niso dovoljene. To vrne napako Err:533 "Ugnezdene matrike niso podprte". To je novo sporočilo napake, namenjeno tudi prevajanju v druge jezike.