<< norm | QD: 32 bytes decimal arithmetics | qdpow >>

DD_QD (MuPAT) >> DD_QD (MuPAT) > QD: 32 bytes decimal arithmetics > qdones

# qdones

QD matrix made of ones

### Syntax

    a = qdones(m,n)
    a = ones(QDmat)

### Parameters

m, n

  positive integers

QDmat

  a matrix of QD numbers

a

  matrix full of QD ones, of size [m,n] or size(QDmat).

### Examples

    qdones(1,1)   // scalar
    qdones(1,4)   // vector
    qdones(2,3)   // matrix

    d = qdrand(2,4);
    ones(d)

    --> qdones(1,1)   // scalar
     ans  =
       1.00000000000000000000000000000000000000000000000000000000000000E0

    --> qdones(1,4)   // vector
     ans  =
    [d1]
       1.   1.   1.   1.

    [d2] zeros(1,4)
    [d3] zeros(1,4)
    [d4] zeros(1,4)

    --> qdones(2,3)   // matrix
     ans  =
    [d1]
       1.   1.   1.
       1.   1.   1.

    [d2] zeros(2,3)
    [d3] zeros(2,3)
    [d4] zeros(2,3)

    --> d = qdrand(2,4);
    --> ones(d)
     ans  =
    [d1]
       1.   1.   1.   1.
       1.   1.   1.   1.

    [d2] zeros(2,4)
    [d3] zeros(2,4)
    [d4] zeros(2,4)

### See Also

- ddones — generates a matrix made of DD ones
- qdeye — Identity matrix
- qdzeros — QD matrix made of zeros
- qdrand — (Quasi) Pseudorandom QD number generator
- qd — builds an array of QD numbers
- QD overloads — Available overloads for DD and QD real numbers

### Authors

Copyright (C) 2011 - Tsubasa Saito

Report an issue
<< norm | QD: 32 bytes decimal arithmetics | qdpow >>