跟踪板
创建轨道绘图仪
描述
creates a track plotter for use with the theater plottPlotter
= trackPlotter(tp
)tp
.
creates a track plotter with additional options specified by one or moretPlotter
= trackPlotter(tp
,Name,Value
)Name,Value
配对参数。
例子
Plot Tracks in Theater Plot
创建剧院情节。用显示名称
set to'Tracks'
and with历史记录
set to5
.
tp = theaterPlot('xlim',[0,90],'YLim',[-35,35]); tPlotter = trackPlotter(tp,'DisplayName','Tracks','HistoryDepth',5);
用标有三个曲目更新曲目绘图仪'T1'
,'T2'
, 和'T3'
with start positions in units of meters all starting at (30, 5, 1) with corresponding velocities (in m/s) of (3, 0, 1), (3, 2, 2) and (3, -3, 5), respectively. Update the tracks with the velocities for ten iterations.
位置= [30,5,1;30、5、1;30、5、1];速度= [3,0,1;3、2、2;3,-3,5];标签= {'T1','T2','T3'};fori=1:10 plotTrack(tPlotter, positions, velocities, labels) positions = positions + velocities;end
该动画通过所有生成的图。
Input Arguments
tp
—Theater plot
戏剧图
object
Theater plot, specified as a戏剧图
目的。
Name-Value Arguments
将可选的参数对Name1=Value1,...,NameN=ValueN
, whereName
is the argument name and价值
是相应的值。名称值参数必须在其他参数之后出现,但是对的顺序并不重要。
Before R2021a, use commas to separate each name and value, and encloseName
in quotes.
例子:“标记”,10
显示名称
—Plot name to display in legend
character vector|string scalar
Plot name to display in legend, specified as the comma-separated pair consisting of'DisplayName'
and a character vector or string scalar. If no name is specified, no entry is shown.
例子:“ displayName”,“雷达检测”
历史记录
—Number of previous track updates to display
0
(default) |非负整数小于或等于10,000
Number of previous track updates to display, specified as the comma-separated pair consisting of'HistoryDepth'
一个非负整数小于或等于10,000。如果设置为0,则不会呈现以前的更新。
ConnectHistory
—Connect tracks flag
'离开'
(default) |'on'
Connect tracks flag, specified as either'on'
或者'离开'
. When set to'on'
, tracks with the same label or track identifier between consecutive updates are connected with a line. This property can only be specified when creating the跟踪板
. The default is'离开'
.
To use thetrackIDs输入参数绘图
,'ConnectHistory'
一定是'on'
. IftrackIDsis omitted when'ConnectHistory'
is'on'
, then the track identifiers are derived from the labels input instead.
着色史
—使轨道历史记录着色
'离开'
(default) |'on'
为轨道历史记录着色,指定为'on'
或者'离开'
. When set to'on'
,连续更新之间具有相同标签或轨道标识符的轨道与不同颜色的线连接。仅在创建该属性时才能指定跟踪板
。默认值为'离开'
.
ColorizedHistory
is applicable only whenConnectHistory
is'on'
.
Marker
—标记符号
's'
(default) |character vector|string scalar
标记符号, specified as the comma-separated pair consisting of“标记”
这些符号之一。
Marker | 描述 | Resulting Marker |
---|---|---|
'o' |
Circle |
|
'+' |
加号 |
|
'*' |
Asterisk |
|
'.' |
观点 |
|
'x' |
叉 |
|
'_' |
Horizontal line |
|
'|' |
垂线 |
|
's' |
Square |
|
'd' |
Diamond |
|
'^' |
向上的三角形 |
|
'v' |
Downward-pointing triangle |
|
'>' |
Right-pointing triangle |
|
'<' |
Left-pointing triangle |
|
'p' |
五角星 |
|
'h' |
Hexagram |
|
'none' |
没有标记 | Not applicable |
MarkerSize
—Size of marker
10
(default) |positive integer
Size of marker, specified as the comma-separated pair consisting of“标记”
以及积极的积分。
MarkeredGecolor
—Marker outline color
'black'
(default) |character vector|string scalar|RGB triplet|十六进制的颜色代码
标记大纲颜色,指定为逗号分隔对“标记为彩色”
and a character vector, a string scalar, an RGB triplet, or a hexadecimal color code.
MarkerFaceColor
—标记填充颜色
'none'
(default) |character vector|string scalar|RGB triplet|十六进制的颜色代码
标记大纲颜色,指定为逗号分隔对'MarkerFaceColor'
和字符向量,字符串标量,RGB三重态,十六进制颜色代码或'none'
. The default is'none'
.
FontSize
—Font size for labeling tracks
10
(default) |positive integer
标签轨道的字体尺寸,指定为逗号分隔对'FontSize'
以及代表字体点大小的正整数。
标签
—Gap between label and positional point
[0 0 0]
(default) |three-element row vector
Gap between label and positional point it annotates, specified as the comma-separated pair consisting of'LabelOffset'
和三元素行矢量。指定[xyz] offset in meters.
VelocityScaling
—Scale factor for magnitude length of velocity vectors
1
(default) |positive scalar
Scale factor for magnitude length of velocity vectors, specified as the comma-separated pair consisting of'VelocityScaling'
和一个正标量。该图将幅度向量值作为VK, whereV是每秒米的速度的大小,并且Kis the value ofVelocityScaling
.
标签
—标签to associate with the plotter
'PlotterN'
(default) |character vector|string scalar
标签to associate with the plotter, specified as the comma-separated pair consisting of'Tag'
and a character vector or string scalar. The default value is'PlotterN'
, whereNis an integer that corresponds to theN与戏剧图
.
标签提供了一种识别绘图仪对象的方法,例如在搜索使用时findPlotter
.
Version History
See Also
开放示例
You have a modified version of this example. Do you want to open this example with your edits?
matlab命令
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择一个网站
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:.
您还可以从以下列表中选择一个网站:
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.
美洲
- AméricaLatina(Español)
- 加拿大(英语)
- 美国(英语)