Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this 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

See Also

| |

Was this topic helpful?