<< ddnrt | DD: 16 bytes decimal arithmetics | ddpow >>

DD_QD (MuPAT) >> DD_QD (MuPAT) > DD: 16 bytes decimal arithmetics > ddones

# ddones

generates a matrix made of DD ones

### Syntax

    a = ddones(m,n)
    a = ones(DDmat)

### Parameters

m,n

  positive integers: numbers of rows and columns

DDmat

  a matrix of DD numbers

a

  matrix full of DD ones, of size [m,n] or size(DDmat).

### Examples

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

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

    --> ddones(1,1)   // scalar
     ans  =
       1.000000000000000000000000000000E0

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

    [d2] zeros(1,4)

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

    [d2] zeros(2,3)

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

    [d2] zeros(2,4)

### See Also

- ddzeros — generates a matrix made of DD zeros
- ddeye — Identity matrix
- ddrand — (Quasi) Pseudorandom DD number generator
- dd — builds an array of DD numbers
- qdones — QD matrix made of ones

### Authors

Copyright (C) 2011 - Tsubasa Saito

Report an issue
<< ddnrt | DD: 16 bytes decimal arithmetics | ddpow >>