Main Content

plotGeometry

Plot measurements geometry

Since R2024a

    Description

    example

    plotGeometry(s) plots the 3-D geometry of the SOFA data. The plot includes the spatial locations of the receivers and the moving source.

    example

    plotGeometry(s,MeasurementIndex=idx) includes only the specified measurements in the plot.

    Examples

    collapse all

    Read in a SOFA file containing HRTF measurements.

    s = sofaread("ReferenceHRTF.sofa");

    Call plotGeometry to visualize the 3-D locations of the receiver and moving source from the measurements.

    plotGeometry(s)

    Read in a SOFA file containing HRTF measurements.

    s = sofaread("ReferenceHRTF.sofa");

    Use findMeasurements to get the indices of measurements in the sagittal plane at a lateral angle of 10 degrees.

    idx = findMeasurements(s,Plane="sagittal",PlaneOffsetAngle=10);

    Plot the 3-D geometry of the specified measurements.

    plotGeometry(s,MeasurementIndex=idx);

    Input Arguments

    collapse all

    SOFA object to plot, specified as one of the following objects.

    Indices of measurements to plot, specified as a vector of positive integers. The indices must correspond to measurements in the data of the SOFA object s. You can use the findMeasurements function to get indices of measurements in the SOFA object.

    By default, the plotGeometry function plots all of the measurements.

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

    Version History

    Introduced in R2024a