plotTrajectory
Description
plotTrajectory(
plots trajectories specified by trajPlotter
,trajCoordList
)trajCoordList
via the trajectory
plotter on a theater plot.
Examples
Plot Trajectories in Theater Plot
Define the coordinates for three trajectories.
coordinates1 = [(1:10)' (2:11)' (11:-1:2)']; coordinates2 = coordinates1 + 1; coordinates3 = coordinates1 + 2;
Create a theaterPlot
object, set the view angles, and create a trajectoryPlotter
object.
tp = theaterPlot;
view(14,50)
trajPlotter = trajectoryPlotter(tp,DisplayName="Trajectories");
Plot the three trajectories.
plotTrajectory(trajPlotter,{coordinates1,coordinates2,coordinates3})
Input Arguments
trajPlotter
— Trajectory plotter
trajectoryPlotter
object
Trajectory plotter, specified as a trajectoryPlotter
object.
trajCoordList
— Coordinates of trajectories
cell array
Coordinates of the trajectories to show, specified as an N-element cell array, where N is the number of trajectories. Each cell element, representing a trajectory, contains an M-by-3 matrices, where M is the number of points in the trajectory. The matrices in different cells can have a different number of rows. The first, second, and third columns of each matrix correspond to the x-, y-, and z-coordinates of the corresponding trajectory.
Example: coordList = {[1 2 3; 4 5 6; 7,8,9];[4 2 1; 4 3 1];[4 4 4; 3 1 2; 9
9 9; 1 0 2]}
specifies three different trajectories.
Version History
Introduced in R2021a
See Also
trajectoryPlotter
| theaterPlot
| clearData
| clearPlotterData
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)