meta.FixedDimension class
Package: meta
Superclasses: meta.ArrayDimension
Fixed dimension in property size specification
Description
The meta.Validation
class Size
property uses meta.FixedDimension
objects to represent the fixed values in a property size specification. The object Length property contains the numeric value of the dimension.
Properties
Examples
Find the fixed dimensions in a property validation.
The ValidationExample
class specifies the size of the property value as (1,:)
.
classdef ValidationExample properties Prop (1,:) double {mustBeReal, mustBeGreaterThan(Prop, 10)} = 200; end end
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} = ':'; end end
Version History
Introduced in R2018a