Skip to main content

ZOSAPI -MATLAB Field Normalization Type

  • April 10, 2020
  • 1 reply
  • 43 views

I'm trying to change the field normalization type from Radial to Rectangular in MATLAB but cannot figure out the Syntax:

I've tried the following

sysField = TheSystem.SystemData.Fields;

1. sysField.Normalization(ZOSAPI.FieldNormalizationType.Rectangular);  - This doesn't work because Normalization is property with a get/set 

2. sysField.Normalization = ZOSAPI.FieldNormalizationType.Rectangular;

3. sysField.Nomalization.GetType = ZOSAPI.FieldNormalizationType.Rectangular;

and
4. ZOSAPI.FieldNormalizationType.Rectangular;

Will somebody point me in the correct direction to figure out this syntax?

1 reply

Ali H
Forum|alt.badge.img+1
  • Visible
  • April 21, 2020
Here we are using the Normalization set property of the IField Interface to return the FieldNormalizationType:

sysField.Normalization



but as the Field Normalization Type is an enumeration, we need to use

ZOSAPI.SystemData.FieldNormalizationType.Rectangular,



so we need to write:

sysField.Normalization = ZOSAPI.SystemData.FieldNormalizationType.Rectangular

I hope this helps!