# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# size

Class: qrandset

Number of dimensions in matrix

## Syntax

```d = size(p) [m,n] = size(p) m = size(p,dim) ```

## Description

`d = size(p)` returns the two-element row vector `d = [m,n]` containing the number of points in the point set and the number of dimensions the points are in, for the point set `p`. These correspond to the number of rows and columns in the matrix that would be produced by the expression `p(:,:)`.

`[m,n] = size(p)` returns the number of points and dimensions for `p` as separate output variables.

`m = size(p,dim)` returns the length of the dimension specified by the scalar `dim`. For example, `size(p,1)` returns the number of rows (points in the point set). If `dim` is greater than 2, `m` will be 1.

## Examples

The commands

```P = sobolset(12); d = size(P)```
return
`d = [9.0072e+015 12]`
The command
`[m,n] = size(P)`
returns
```m = 9.0072e+015 n = 12```
The command
`m2 = size(P, 2)`
returns
` m2 = 12`