Main Content

속성

속성 선언, 특성, 액세스 메서드

속성에는 객체 데이터가 포함되어 있습니다. 클래스는 모든 객체에 대해 동일한 속성을 정의하지만, 각 객체는 고유한 데이터 값을 가질 수 있습니다. 속성 특성은 속성에 액세스할 수 있는 함수나 메서드를 제어합니다. 속성값을 설정하거나 쿼리할 때마다 실행되는 함수를 정의할 수 있습니다. 속성은 코드가 해당 값에 액세스할 때 이벤트를 트리거할 수 있습니다.

함수

모두 확장

properties클래스 속성 이름
isprop속성이 객체에 의해 정의되는지 확인

숫자형 값 특성 유효성 검사

mustBePositiveValidate that value is positive
mustBeNonpositiveValidate that value is nonpositive
mustBeNonnegativeValidate that value is nonnegative
mustBeNegativeValidate that value is negative
mustBeFiniteValidate that value is finite
mustBeNonNanValidate that value is not NaN
mustBeNonzeroValidate that value is nonzero
mustBeNonsparseValidate that value is nonsparse
mustBeRealValidate that value is real
mustBeIntegerValidate that value is integer
mustBeNonmissingValidate that value is not missing (R2020b 이후)

비교 유효성 검사

mustBeGreaterThanValidate that value is greater than another value
mustBeLessThanValidate that value is less than another value
mustBeGreaterThanOrEqualValidate that value is greater than or equal to another value
mustBeLessThanOrEqualValidate that value is less than or equal to another value

데이터형 유효성 검사

mustBeAValidate that value comes from one of specified classes (R2020b 이후)
mustBeNumericValidate that value is numeric
mustBeNumericOrLogicalValidate that value is numeric or logical
mustBeFloatValidate that value is floating-point array (R2020b 이후)
mustBeTextValidate that value is string array, character vector, or cell array of character vectors (R2020b 이후)
mustBeTextScalar값이 한 조각의 텍스트인지 확인 (R2020b 이후)
mustBeNonzeroLengthTextValidate that value is text with nonzero length (R2020b 이후)
mustBeUnderlyingTypeValidate that value has specified underlying type (R2020b 이후)

크기 유효성 검사

mustBeNonemptyValidate that value is nonempty
mustBeScalarOrEmptyValidate that value is scalar or empty (R2020b 이후)
mustBeVectorValidate that value is vector (R2020b 이후)

멤버 및 범위 유효성 검사

mustBeMemberValidate that value is member of specified set
mustBeInRangeValidate that value is in the specified range (R2020b 이후)

특수 의미를 갖는 텍스트 유효성 검사

mustBeFileValidate that path refers to file (R2020b 이후)
mustBeFolderValidate that input path refers to folder (R2020b 이후)
mustBeValidVariableNameValidate that input name is valid variable name (R2020b 이후)

클래스

dynamicprops동적 속성을 지원하는 클래스의 슈퍼클래스
meta.DynamicPropertyMATLAB 객체의 동적 속성 설명
event.DynamicPropertyEvent동적 속성 이벤트의 이벤트 데이터
meta.propertyMATLAB 클래스의 속성 설명
meta.Validation 속성 유효성 검사 설명
meta.FixedDimension 속성 크기 사양의 고정 차원
meta.UnrestrictedDimension 속성 크기 사양의 무제한 차원
meta.ArrayDimension 속성 유효성 검사에 대한 크기 정보
matlab.lang.OnOffSwitchStateRepresent on and off states with logical values

도움말 항목

속성 정의하기와 특성(Attribute) 설정하기

속성 유효성 검사

속성 액세스 메서드

동적 속성