Contenido principal

ComponentMaterialTolerance

R2026b

Tolerance for component material property

Since R2026b

    Description

    Add-On Required: This feature requires the Optical Design and Simulation Library for Image Processing Toolbox add-on.

    A ComponentMaterialTolerance object defines a tolerance for the refractive index or Abbe number of one or more components of an optical system for use in sensitivity and Monte Carlo tolerance analysis.

    Creation

    Description

    tol = optics.tolerance.ComponentMaterialTolerance(propertyName,value) creates a tolerance with the specified value for the specified material property. The tolerance applies to all top-level components in an optical system.

    tol = optics.tolerance.ComponentMaterialTolerance(propertyName,value,TargetIndex=targetIdx) applies the tolerance to only the components specified by targetIdx.

    example

    Input Arguments

    expand all

    Material property to which to apply the tolerance, specified as "Nd" (refractive index) or "Vd" (Abbe number).

    • "Nd" — Applies a uniform offset to the refractive index across all wavelengths while preserving the dispersion curve shape.

    • "Vd" — Scales dispersion curve deviations while keeping the refractive index fixed.

    This object assumes that refractive index and absorption variations are uncorrelated. This assumption might not apply to some materials with significant absorption, such as materials with iron-content variations.

    Data Types: char | string

    Tolerance value, specified as a numeric scalar or a 1-by-2 numeric vector of the form [min max].

    • Scalar — Specifies a percentage tolerance relative to the nominal value. Percentage tolerances have no effect when the nominal value is zero.

    • 1-by-2 vector — Specifies an offset tolerance range [min max] relative to the nominal value.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    Component indices to target, specified as a vector of positive integers. By default, the tolerance applies to all top-level components. Tolerancing for nested components is not supported.

    Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

    Properties

    expand all

    This property is read-only.

    Property to which the tolerance applies, represented as "Nd" or "Vd".

    Data Types: string

    Target component indices, specified as a vector of positive integer. An empty value means the tolerance applies to all top-level components. Sub-component targeting is not allowed.

    Data Types: double

    Tolerance range, specified as a 1-by-2 vector [min max]. When you specify value as a scalar, this is [-value +value].

    Data Types: double

    This property is read-only.

    Tolerance interpretation type, represented as "Percentage" when you specify value as a scalar, or "Absolute" when you specify value as a 1-by-2 vector.

    Object Functions

    applyApply tolerance perturbation to optical system

    Examples

    collapse all

    Import an optical system into the workspace.

    opsys = zmximport("PhotographicLens.zmx");

    Define a component material tolerance ranging from -0.5 to 0.5 for refractive index of the 3rd top-level component.

    tol = optics.tolerance.ComponentMaterialTolerance(Nd=0.5,TargetIndex=3)
    tol = 
      ComponentMaterialTolerance with properties:
    
        TargetProperty: "Nd"
           TargetIndex: 3
        ToleranceRange: [-0.5000 0.5000]
         ToleranceType: "Percentage"
    
    

    Apply the tolerance to the optical system.

    newopsys = apply(tol,opsys);

    Version History

    Introduced in R2026b