| Contents | Index |
Number of dimensions in matrix
d = size(p)
[m,n] = size(p)
m = size(p,dim)
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.
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
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |