Matrix Elements VB-800 Instrukcja Użytkownika Strona 152

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 151
144 Appendix A6 OxGauss Language Reference
must either be scalars, or a range. A range has the form start-index : end-index.
A space inside a parenthesized expression is not a separator.
A6.8.2.2 Transpose
The postfix operators and .’ take the transpose of a matrix. It has no effect on other
arithmetic types of operands. There is only a difference if the operand is a complex
matrix.
The following translations are made when parsing OxGauss code:
identifier into ’*identifier
’( into ’*(
.’ identifier into .’ * identifier
.’ ( into .’ * (
A single quote is also used in a character constant; the context avoids ambiguity.
.
A6.8.2.3 Factorial
The postfix operator ! takes the factorial of the operand (if it is a matrix: of each
element). Elements are rounded to the nearest integer before the factorial is applied.
A6.8.3 Power expressions
The operands of the power operator must have arithmetic type, and the result is given
in the table. Note that .^ and ^ are always the same. A scalar consists of: int, double
or 1 × 1 matrix.
left a operator right b result computes
int ^.^ int or double int a
b
int/double ^.^ double double a
b
double ^.^ scalar double a
b
scalar ^.^ matrix m × n matrix m × na
b
ij
matrix m × n ^.^ scalar matrix m × na
b
ij
matrix m × n ^.^ matrix m × n matrix m × na
b
ij
ij
When a and b are integers, then a^bis an integer if b 0 and if the result can
be represented as a 32 bit signed integer. If b<0 and a 6=0or the integer result
would lead to overflow, the return type is double, giving the outcome of the floating
point power operation.
A6.8.4 Unary expressions
The operand of the unary minus operator must have arithmetic type, and the result is
the negative of the operand. For a matrix each element is set to its negative. Unary plus
is ignored.
Przeglądanie stron 151
1 2 ... 147 148 149 150 151 152 153 154 155 156 157 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag