This is machine translation

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

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

meta.UnrestrictedDimension class

Package: meta
Superclasses: meta.ArrayDimension

Unrestricted dimension in property size specification


The meta.Validation class Size property uses meta.UnrestrictedDimension objects to represent the use of a colon in a property size specification. An instance of this class in the Size array indicates that the respective dimension in the property definition is a colon. A colon in a size specification indicates that any values is allowed.



For information on class attributes, see Class Attributes.


Find the fixed dimensions in a property validation.

The ValidationExample class specifies the size of the property value as (1,:).

classdef ValidationExample
      Prop (1,:) double {mustBeReal, mustBeGreaterThan(Prop, 10)} = 200;

Read the dimensions into a cell array.

mc = ?ValidationExample;
mp = findobj(mc.PropertyList,'Name','Prop');
sz = mp.Validation.Size;
len = length(sz);
dim = cell(1:len);
for k = 1:len
   switch class(sz(k))
      case 'meta.FixedDimension'
         dim{k} = sz(k).Length;
      case 'meta.UnrestrictedDimension'
         dim{k} = ':';

Introduced in R2018a