vis2d

Visualize a 2D slice of a 3D field solution with objects and sources.

Contents

Syntax

vis2d(scalar3d, normal_axis, intercept, [opts])
vis2d(scalar3d, normal_axis, intercept, obj_array, [opts])
vis2d(scalar3d, normal_axis, intercept, obj_array, src_array, [opts])
vis2d(scalar2d, [opts])
vis2d(scalar2d, obj_array, [opts])
vis2d(scalar2d, obj_array, src_array, [opts])

Description

vis2d(scalar3d, normal_axis, intercept) vizualizes a 2D slice of one of the x-, y-, z-components of the E- or H-field stored as an instance of Scalar3d. normal_axis is an instance of Axis the represents the axis normal to the slice, and intercept is the intercept of the slice on the normal axis.

vis2d(scalar2d) vizualizes a 2D slice stored as an instance of Scalar2d.

vis2d(..., obj_array) visualizes the objects in obj_array with the slice of a field. The elements of obj_array are instances of Object.

vis2d(..., obj_array, src_array) visualizes the objects and sources in obj_array and src_array with the slice of a field. The elements of src_array are instances of Source.

The optional argument opts is an options structure that controls the behavior of visualization. The fields of the structure are explained below. The default values of the fields are shown in brackets {}.

Example

[E, H, obj_array, src_array] = maxwell_run({ARGUMENTS});
opts.cscale = 5e-3;
opts.wihabs = true;
vis2d(E{Axis.y}, Axis.z, 0, obj_array, src_array, opts);