<< concatenations | DD_QD (MuPAT) | conversions >>

DD_QD (MuPAT) >> DD_QD (MuPAT) > size

# size

sizes of a DD or QD array

### Syntax

    s = size(A)
    nr = size(A, "r"|1)
    nc = size(A, "c"|2)
    n = size(A, "*")
    [nr, nc] = size(A)

### Arguments

A
  Array of DD or QD real numbers
s
  vector `[nr, nc]`
nr
  single integer: number of rows
nc
  single integer: number of columns
n
  single integer: number of elements (= nr*nc).

### Description

`size()` works with DD and QD arrays as for arrays of regular data types.

### Examples

    a = ddzeros(3,5);
    s = size(a)
    [r,c] = size(a)
    r = size(a, 1)
    c = size(a, 2)
    n = size(a, "*")

    --> a = ddzeros(3,5);
    --> s = size(a)
     s  =
       3.   5.

    --> [r,c] = size(a)
     c  =
       5.
     r  =
       3.

    --> r = size(a, 1)
     r  =
       3.

    --> c = size(a, 2)
     c  =
       5.

    --> n = size(a, "*")
     n  =
       15.

### See Also

- dd — builds an array of DD numbers
- qd — builds an array of QD numbers
- concatenations
- DD & QD overloads — Available overloads for DD and QD real numbers

### Authors

Copyright (C) 2018 - Samuel GOUGEON

Report an issue
<< concatenations | DD_QD (MuPAT) | conversions >>