メインコンテンツ

このページの内容は最新ではありません。最新版の英語を参照するには、ここをクリックします。

plotTrajectory

軌跡プロッターで一連の軌跡をプロットする

説明

plotTrajectory(trajPlotter,trajCoordList) は、軌跡プロッターを介して、trajCoordList で指定された軌跡をシアター プロット上にプロットします。

すべて折りたたむ

3 つの軌跡の座標を定義します。

coordinates1 = [(1:10)' (2:11)' (11:-1:2)'];
coordinates2 = coordinates1 + 1;
coordinates3 = coordinates1 + 2;

theaterPlot オブジェクトを作成し、視点角度を設定して、trajectoryPlotter オブジェクトを作成します。

tp = theaterPlot;
view(14,50)
trajPlotter = trajectoryPlotter(tp,DisplayName="Trajectories");

3 つの軌跡をプロットします。

plotTrajectory(trajPlotter,{coordinates1,coordinates2,coordinates3})

Figure contains an axes object. The axes object with xlabel X (m), ylabel Y (m) contains an object of type line. This object represents Trajectories.

入力引数

すべて折りたたむ

軌跡プロッター。trajectoryPlotter オブジェクトとして指定します。

表示する軌跡の座標。N 要素の cell 配列として指定します。ここで、N は軌跡の数です。軌跡を表す各 cell 要素には M 行 3 列の行列が含まれます。ここで、M は軌跡内の点の数です。異なる cell 内の行列には異なる行数を含めることができます。各行列の 1 列目、2 列目、3 列目は、対応する軌跡の x 座標、y 座標、および z 座標に対応します。

例: 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]} は 3 つの異なる軌跡を指定します。

バージョン履歴

R2018b で導入