plotPlatform

Plot set of platforms in platform plotter

Description

plotPlatform(platPlotter,positions) specifies positions of M platforms whose positions are plotted by platPlotter. Specify the positions as an M-by-3 matrix, where each column of the matrix corresponds to the x-, y-, and z-coordinates of the platform locations.

plotPlatform(platPlotter,positions,velocities) also specifies the corresponding velocities of the platforms. Velocities are plotted as line vectors emanating from the positions of the platforms. If specified, velocities must have the same dimensions as positions.

plotPlatform(platPlotter,positions,labels) also specifies a cell vector of length M whose elements contain the text labels corresponding to the M platforms specified in the positions matrix. If omitted, no labels are plotted.

example

plotPlatform(platPlotter,positions,velocities,labels) specifies velocities and text labels corresponding to the M platforms specified in the positions matrix.

Examples

collapse all

Create a theater plot.

tp = theaterPlot('XLim',[0,90],'YLim',[-35,35],'ZLim',[1,10]);

Create a platform plotter with the name 'Platforms'.

plotter = platformPlotter(tp,'DisplayName','Platforms');

Update the theater plot with three platforms labeled, 'R1', 'R2', and 'R3'. Position the three platforms, in units of meters, at (30,5,4), (30,-10,2), and (30,15,1), with corresponding velocities (in m/s) of (-10,0,2), (-10,3,1), and (-10,-4,1), respectively.

positions = [30, 5, 4; 30, -10, 2; 30, 15, 1];
velocities = [-10, 0, 2; -10, 3, 1; -10, -4, 1];
labels = {'R1','R2','R3'};
plotPlatform(plotter, positions, velocities, labels);

Input Arguments

collapse all

Platform plotter, specified as a platformPlotter object.

Platform positions, specified as an M-by-3 real-valued matrix, where M is the number of platforms. Each column of the matrix corresponds to the x-, y-, and z-coordinates of the platform locations in meters.

Platform velocities, specified as an M-by-3 real-valued matrix, where M is the number of platforms. Each column of the matrix corresponds to the x, y, and z velocities of the platforms. If specified, velocities must have the same dimensions as positions.

Platform labels, specified as an M-by-1 cell array of character vectors, where M is the number of platforms. labels contains the text labels corresponding to the M platforms specified in positions. If labels is omitted, no labels are plotted.

Introduced in R2018b