Main Content

fieldsCustom

Plot electric or magnetic fields of antenna

Description

example

fieldsCustom(fields,points) plots electric or magnetic field vectors, fields, at specified points in space, points, in the current axes.

example

fieldsCustom(fields,points,scalefield) scales the field arrows by a scalar value, scalefield.

qobj = fieldsCustom(___) returns the quiver object, using either of the previous syntaxes.

fieldsCustom(axeshandle,___) plots into the axes specified by axeshandle instead of the current axes.

Examples

collapse all

Load and visualize the magnetic field data available in the file 'fielddata.mat'.

load fielddata
fieldsCustom(H,p)

Figure contains an axes object. The axes object contains an object of type quiver.

Scale the magnetic field arrows by a factor of 2.

figure
fieldsCustom(H,p,2)

Figure contains an axes object. The axes object contains an object of type quiver.

Input Arguments

collapse all

Electric or magnetic field vectors, specified as a 3-by-p complex matrix. p is the number of points in space.

Data Types: double

x, y, z coordinates in space, specified as a 3-by-p real matrix. p is the number of points in space.

Data Types: double

Axes object, specified as an object.

Data Types: char

Value by which to scale the field arrows, specified as a scalar. A value of 2 doubles the relative length of the field arrows. A value of 0.5 halves the length of the field arrows. A value of 0 plots the field arrows without automatic scaling.

Example: 2

Data Types: double

Output Arguments

collapse all

Electric or magnetic field plot, returned as quiver object.

Introduced in R2016a